diff options
| author | Connor McDowell <[email protected]> | 2024-01-27 16:07:19 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-01-27 16:07:19 -0800 |
| commit | 3618edea4f5ec80ecab5160d59bedbc8615cffa5 (patch) | |
| tree | 1bc59c5b839618af56d105b19c15439bfe40d2b8 /homework2/homework2.cpp | |
| parent | couts and cins created, variables created, statements created. (diff) | |
| download | homework-2-connormcdowell275-3618edea4f5ec80ecab5160d59bedbc8615cffa5.tar.xz homework-2-connormcdowell275-3618edea4f5ec80ecab5160d59bedbc8615cffa5.zip | |
Cel to fah if outs created
Diffstat (limited to 'homework2/homework2.cpp')
| -rw-r--r-- | homework2/homework2.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/homework2/homework2.cpp b/homework2/homework2.cpp index 2df6cf0..7504751 100644 --- a/homework2/homework2.cpp +++ b/homework2/homework2.cpp @@ -57,5 +57,35 @@ float CtoF(float cel) float num = (cel * (9.0 / 5.0)) + 32; + if (0 < num < 32) + { + std::cout << "The temperature: " << num << " fahrenheit, is cold enough that water freezes! brrr!"; + } + + if (33 < num < 65) + { + std::cout << "The temperature: " << num << " fahrenheit, is quite chilly! bring a sweater"; + } + + if (66 < num < 76) + { + std::cout << "The temperature: " << num << " fahrenheit, is around room temperature and quite comfortable"; + } + + if (78 < num < 88) + { + std::cout << "The temperature: " << num << " fahrenheit, is pretty warm! drink plenty of water and stay in the shade when you can."; + } + + if (89 < num < 100) + { + std::cout << "The temperature: " << num << " fahrenheit, is very hot, wear sunscreen and hydrate often if going out."; + } + + if (num > 101) + { + std::cout << "The temperature: " << num << " fahrenheit, do not even think about leaving the house."; + } + return num; }
\ No newline at end of file |