Exercise Chapter 3 in The Book of Rust
Exercise 1: Convert temperatures between Fahrenheit and Celsius.
fn f_to_c(degree: i32) -> i32{
((degree as f64 - 32.) * 5. / 9.).round() as i32
}
fn c_to_f(degree: i32) -> i32{
(degree as f64 / 5. * 9. + 32.).round() as i32
}
Exercise 2: G...
kaisei.hashnode.dev2 min read