Fahrenheit and Celsius converter in Rust I made a program that converts between Celsius and Fahrenheit. Is there any way that I could make this code more efficient and cleaner?

use std::io;

// C to F: F = C*(9/5) + 32
// F to C: C = (F-32)*(5/9)

/**********Converts between Fahrenheit and Celsius*********/

fn main() -&gt; () {
    println!("Do you want to convert to Celsius or Fahrenheit? Input C or F");
    let mut convert_type = String::new();

    io::stdin().read_line(&amp;mut convert_type)
        .expect("Failed to conversion type.");

    let t = String::from(convert_type);

    println!("You want to convert to: {}", t);
    println!("What temperature would you like to convert?");
    let mut temp = String::new();

    io::stdin().read_line(&amp;mut temp)
        .expect("Failed to read temperature.");

    let temp: i32 = match temp.trim().parse() {
        Ok(temp) =&gt; temp,
        Err(_e) =&gt; {
            -1
        }
    };

    match t.as_str() {
        "C\n" =&gt; println!("{}", ftoc(temp)),
        "F\n" =&gt; println!("{}", ctof(temp)),
        _ =&gt; println!("t = {:?}", t),
}
}

// Celsius to Fahrenheit
fn ctof(c: i32) -&gt; i32 {
    (c * (9 / 5)) + 32

}

//Fahrenheit to Celsius
fn ftoc(f: i32) -&gt; i32 {
    (f-32) * (5 / 9)
}


Output:

    cargo run
   Compiling ftoc v0.1.0 (/Users/roberthayek/rustprojects/ftoc)
    Finished dev [unoptimized + debuginfo] target(s) in 2.64s
     Running `target/debug/ftoc`
Do you want to convert to Celsius or Fahrenheit? Input C or F
F
You want to convert to: F

What temperature would you like to convert?
0
32
The first thing I always do is running clippy.

You will catch some things that are not neccessary, e.g. 


fn main() -&gt; () can be reduced to fn main()
let t = String::from(convert_type); is simply let t = convert_type


The bad things are


c * (9 / 5) which is always c because of integer arithmetic. You probably want f64::from(c) * (9.0 / 5.0)
same for (f - 32) * (5 / 9) should be (f64::from(f) - 32.0) * (5.0 / 9.0)) as i32


You may want to add some unit-tests to your program to verify that ctof and ftoc actually work.