on 5f6e310 help sign in
bat/assets/theme_preview.rs
5 lines 172 B history raw
1 // Output the square of a number.
2 fn print_square(num: f64) {
3 let result = f64::powf(num, 2.0);
4 println!("The square of {:.2} is {:.2}.", num, result);
5 }