bat/assets/theme_preview.rs

6 lines
172 B
Rust
Raw Normal View History

2018-08-28 19:48:07 +02:00
// Output the square of a number.
fn print_square(num: f64) {
let result = f64::powf(num, 2.0);
println!("The square of {:.2} is {:.2}.", num, result);
}