Compare commits
No commits in common. "c77249b6c84e7af7816704c227751ed231b644c5" and "4c48c1b0af2952a495fa1feb00171201e0efca28" have entirely different histories.
c77249b6c8
...
4c48c1b0af
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,4 +21,3 @@ Cargo.lock
|
|||||||
#.idea/
|
#.idea/
|
||||||
**/target
|
**/target
|
||||||
**/debug
|
**/debug
|
||||||
main
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
[package]
|
|
||||||
name = "fahrenheit_to_celsius"
|
|
||||||
version = "0.1.0"
|
|
||||||
edition = "2021"
|
|
||||||
|
|
||||||
[dependencies]
|
|
@ -1,10 +0,0 @@
|
|||||||
use std::env;
|
|
||||||
fn main() {
|
|
||||||
let args: Vec<String> = env::args().collect();
|
|
||||||
let farenheight_input:String = args[1].clone();
|
|
||||||
let farenheight:f32 = farenheight_input
|
|
||||||
.parse()
|
|
||||||
.expect("No input entered");
|
|
||||||
let celsius = (farenheight - 32.0) * (5.0 / 9.0);
|
|
||||||
println!("F = {}, C = {}",farenheight,celsius);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user