pub fn print_common_table() {
        let mut celsius_table: Vec<f64> = vec![-40.0];
        for n in (-40..100).step_by(10) {
            celsius_table.push(n as f64 + 10.0);
        }

        let fahrenheit_table: Vec<f64> = celsius_table
            .iter()
            .cloned()
            .map(|x| convert(&Temperature::C(x)))
            .collect();

        for (x, y) in celsius_table
            .iter()
            .cloned()
            .zip(fahrenheit_table.iter().cloned())
        {
            println!("{:7.2}॰C = {:7.2}॰F", x, y);
        }
        println!();
    }
/// Print a common table of conversions
Print a common table of conversions
Print a common table of conversions
pub fn print_common_table() {
        let mut celsius_table: Vec<f64> = vec![-40.0];
        for n in (-40..100).step_by(10) {
            celsius_table.push(n as f64 + 10.0);
        }
        let fahrenheit_table: Vec<f64> = celsius_table
            .iter()
            .cloned()
            .map(|x| convert(&Temperature::C(x)))
            .collect();
        for (x, y) in celsius_table
            .iter()
            .cloned()
            .zip(fahrenheit_table.iter().cloned())
        {
            println!("{:7.2}॰C = {:7.2}॰F", x, y);
        }
        println!();
    }
pub fn print_common_table ( ) { let mut celsius_table : Vec < f64 > = vec ! [ 40.0 ] ; for n in ( - 40 .. 100 ) . step_by ( 10 ) { celsius_table . push ( n as f64 + 10.0 ) ; } let fahrenheit_table : Vec < f64 > = celsius_table . iter ( ) . cloned ( ) . map ( | x | convert ( & Temperature :: C ( x ) ) ) . collect ( ) ; for ( x , y ) in celsius_table . iter ( ) . cloned ( ) . zip ( fahrenheit_table . iter ( ) . cloned ( ) ) { println ! ( " , ) } println ! ( ) ; }
Print a common table of conversions
Print a common table of conversions