blob: 034150635dbc065da3055ad593a63ba5322ab07d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// Name: Asahel Lopez //
// Class: CST 116 //
// Date: 1/28/24 //
// Assignment: Homework 2 //
#include <iostream>
using namespace std;
int main() {
double celsius, fahrenheit;
float CtoF(int cel);
float FtoC(int fah);
std::cout << " Enter the temperature in Celsius: ";
std::cin >> celsius;
fahrenheit = (9.0 / 5.0) * celsius + 32;
std::cout << "Temperature in Fahrenheit: " << fahrenheit << endl;
#ifdef VERBOSE
std::cout << " 30C to F";
std::cin >> Fahrenheit;
fahrenheit = (9.0 / 5.0) * celsius + 32;
std::cout << " F = 86 " << fahrenheit << endl;
#endif
return 0;
}
|