Exerpad
🔥 0
0 XP
Exercise 3 · Chapter: Linear ProgramsRequired+50 XP

Fix the Math

This program should compute the average of three numbers, but something is wrong with the math. Fix it!

Expected output:

Average: 20
rust
fn main() {
let a = 10;
let b = 20;
let c = 30;

let average = a + b + c * 3;
println!("Average: {}", average);
}
Output
Run your code to see the output here.