mirror of
https://codeberg.org/unbeatable-101/FahrenheitToCelsius.git
synced 2024-06-21 00:57:09 +00:00
Added decimal rounding
This commit is contained in:
parent
1942c48b48
commit
d61e8aefc3
|
@ -20,6 +20,7 @@ fn main() {
|
|||
Ok(num) => num,
|
||||
Err(_) => continue,
|
||||
};
|
||||
println!("{}℉ is {}℃", input, convert(input));
|
||||
println!("{}°F is {:.2}°C", input, convert(input)); //Prints the conversion
|
||||
//and rounds to 2 decimals
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user