Project: Football Passer Rating (NFL and NCAA)
The passer rating formula provides one metric that can be used to compare the performance of quarterbacks. It is based on the number of completions, touchdown passes, interceptions and total passing yards. Write a program that prompts for the number of completed passes, touchdown passes, interceptions, total passing yards and the total number of attempted passes. The program should then prompt the user to display the NFL or NCAA passer rating. Print the rating to one decimal place.
See [[Passer Rating]] for the NFL and NCAA formulas.
Output
$ rustc FootballPasserRating2.rs
error: unknown format trait `f`
--> FootballPasserRating2.rs:39:52
|
39 | println!("{}", format!("NFL Passer rating: {0:.1f}", rating));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> FootballPasserRating2.rs:46:53
|
46 | println!("{}", format!("NCAA Passer rating: {0:.1f}", rating));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:15:16
|
15 | inputStr = &(Utils.prompt("Number of attempts: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:18:16
|
18 | inputStr = &(Utils.prompt("Number of completions: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:21:16
|
21 | inputStr = &(Utils.prompt("Number of touchdown passes: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:24:16
|
24 | inputStr = &(Utils.prompt("Number of interceptions: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:27:16
|
27 | inputStr = &(Utils.prompt("Number of passing yards: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:30:16
|
30 | inputStr = &(Utils.prompt("1 for NFL or 2 for NCAA: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:16:14
|
16 | attempts = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:19:17
|
19 | completions = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:22:21
|
22 | touchdownPasses = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:25:19
|
25 | interceptions = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:28:18
|
28 | passingYards = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:31:11
|
31 | which = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:34:27
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.f64;
| --------- ^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:34:52
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.f64;
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:34:76
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.0f64;
| +
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:35:27
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.f64) * 0.25f64;
| --------- ^^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:35:53
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.f64) * 0.25f64;
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:35:67
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.f64) * 0.25f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.0f64) * 0.25f64;
| +
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:36:26
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.f64;
| --------- ^^^^^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:36:55
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.f64;
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:36:70
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.0f64;
| +
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:37:38
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.f64);
| --------- ^^^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:37:65
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.f64);
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:37:80
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.f64);
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.0f64);
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:38:41
|
38 | let rating:f64 = (a + b + c + d) / 6.f64 * 100.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | let rating:f64 = (a + b + c + d) / 6.0f64 * 100.f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:38:51
|
38 | let rating:f64 = (a + b + c + d) / 6.f64 * 100.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | let rating:f64 = (a + b + c + d) / 6.f64 * 100.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:42:20
|
42 | let b:f64 = 330.f64 * (touchdownPasses) as f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | let b:f64 = 330.0f64 * (touchdownPasses) as f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:43:20
|
43 | let c:f64 = 100.f64 * (completions) as f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
43 | let c:f64 = 100.0f64 * (completions) as f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:44:20
|
44 | let d:f64 = 200.f64 * (interceptions) as f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
44 | let d:f64 = 200.0f64 * (interceptions) as f64;
| +
error: aborting due to 31 previous errors
Some errors have detailed explanations: E0277, E0425, E0610.
For more information about an error, try `rustc --explain E0277`.
$ rustc FootballPasserRating2.rs
error: unknown format trait `f`
--> FootballPasserRating2.rs:39:52
|
39 | println!("{}", format!("NFL Passer rating: {0:.1f}", rating));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error: unknown format trait `f`
--> FootballPasserRating2.rs:46:53
|
46 | println!("{}", format!("NCAA Passer rating: {0:.1f}", rating));
| ^
|
= note: the only appropriate formatting traits are:
- ``, which uses the `Display` trait
- `?`, which uses the `Debug` trait
- `e`, which uses the `LowerExp` trait
- `E`, which uses the `UpperExp` trait
- `o`, which uses the `Octal` trait
- `p`, which uses the `Pointer` trait
- `b`, which uses the `Binary` trait
- `x`, which uses the `LowerHex` trait
- `X`, which uses the `UpperHex` trait
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:15:16
|
15 | inputStr = &(Utils.prompt("Number of attempts: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:18:16
|
18 | inputStr = &(Utils.prompt("Number of completions: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:21:16
|
21 | inputStr = &(Utils.prompt("Number of touchdown passes: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:24:16
|
24 | inputStr = &(Utils.prompt("Number of interceptions: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:27:16
|
27 | inputStr = &(Utils.prompt("Number of passing yards: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find value `Utils` in this scope
--> FootballPasserRating2.rs:30:16
|
30 | inputStr = &(Utils.prompt("1 for NFL or 2 for NCAA: "));
| ^^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:16:14
|
16 | attempts = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:19:17
|
19 | completions = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:22:21
|
22 | touchdownPasses = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:25:19
|
25 | interceptions = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:28:18
|
28 | passingYards = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0425]: cannot find function `stoi` in this scope
--> FootballPasserRating2.rs:31:11
|
31 | which = stoi(inputStr)?;
| ^^^^ not found in this scope
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:34:27
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.f64;
| --------- ^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:34:52
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.f64;
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:34:76
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
34 | let a:f64 = (f64::from(completions) / f64::from(attempts) - 0.3f64) * 5.0f64;
| +
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:35:27
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.f64) * 0.25f64;
| --------- ^^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:35:53
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.f64) * 0.25f64;
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:35:67
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.f64) * 0.25f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
35 | let b:f64 = (f64::from(passingYards) / f64::from(attempts) - 3.0f64) * 0.25f64;
| +
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:36:26
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.f64;
| --------- ^^^^^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:36:55
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.f64;
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:36:70
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
36 | let c:f64 = f64::from(touchdownPasses) / f64::from(attempts) * 20.0f64;
| +
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:37:38
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.f64);
| --------- ^^^^^^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0277]: the trait bound `f64: From<isize>` is not satisfied
--> FootballPasserRating2.rs:37:65
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.f64);
| --------- ^^^^^^^^ the trait `From<isize>` is not implemented for `f64`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<f64 as From<bool>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
<f64 as From<i8>>
<f64 as From<u16>>
<f64 as From<u32>>
<f64 as From<u8>>
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:37:80
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.f64);
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
37 | let d:f64 = 2.375f64 - (f64::from(interceptions) / f64::from(attempts) * 25.0f64);
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:38:41
|
38 | let rating:f64 = (a + b + c + d) / 6.f64 * 100.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | let rating:f64 = (a + b + c + d) / 6.0f64 * 100.f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:38:51
|
38 | let rating:f64 = (a + b + c + d) / 6.f64 * 100.f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
38 | let rating:f64 = (a + b + c + d) / 6.f64 * 100.0f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:42:20
|
42 | let b:f64 = 330.f64 * (touchdownPasses) as f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
42 | let b:f64 = 330.0f64 * (touchdownPasses) as f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:43:20
|
43 | let c:f64 = 100.f64 * (completions) as f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
43 | let c:f64 = 100.0f64 * (completions) as f64;
| +
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> FootballPasserRating2.rs:44:20
|
44 | let d:f64 = 200.f64 * (interceptions) as f64;
| ^^^
|
help: if intended to be a floating point literal, consider adding a `0` after the period
|
44 | let d:f64 = 200.0f64 * (interceptions) as f64;
| +
error: aborting due to 31 previous errors
Some errors have detailed explanations: E0277, E0425, E0610.
For more information about an error, try `rustc --explain E0277`.