This commit is contained in:
DavidOnTop 2025-04-10 14:50:25 +02:00
parent 1f707af9d6
commit ae70fd2920
Signed by: DavidOnTop
GPG key ID: 8D3E9A75E3E13D89

View file

@ -1 +1,12 @@
pub fn main() {} pub fn main() {
println!("hmotnost: (v kg)");
let mut input = String::new();
std::io::stdin().read_line(&mut input).unwrap();
let hmotnost: f32 = input.trim().parse().unwrap();
input.clear();
println!("viska (v m)");
std::io::stdin().read_line(&mut input).unwrap();
let viska: f32 = input.trim().parse().unwrap();
let bmi = hmotnost / viska.powi(2);
println!("bmi: {bmi}")
}