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 | /* < Joanie Decopain > < Program 2> < january 3, 2012> */ #include <iostream> using namespace std; int main() { double celsius ; double fahrenheit; cout << "\n\n\n\n\n\t\t\t\t\t"; cin >>celsius; cout << "Enter temperature in celsius:" << celsius << endl; // Calculate the temperature. fahrenheit = 1.8*celsius+32; cout << "\t\t\t\t\t"; // Display the temperture. cout << "Temperature in fahrenheit is:" << fahrenheit<< endl; cout << "\n\n\n\n\n"; return 0; } |
-
upload with new input
-
result: Success time: 0.01s memory: 2860 kB returned value: 0
100
Enter temperature in celsius:100 Temperature in fahrenheit is:212
-
result: Success time: 0.01s memory: 2860 kB returned value: 0
73
Enter temperature in celsius:73 Temperature in fahrenheit is:163.4
-
result: Success time: 0.01s memory: 2860 kB returned value: 0
22
Enter temperature in celsius:22 Temperature in fahrenheit is:71.6
-
result: Success time: 0.01s memory: 2860 kB returned value: 0
0
Enter temperature in celsius:0 Temperature in fahrenheit is:32
-
result: Success time: 0.02s memory: 2860 kB returned value: 0
-11
Enter temperature in celsius:-11 Temperature in fahrenheit is:12.2
-
result: Success time: 0.01s memory: 2860 kB returned value: 0
50
Enter temperature in celsius:50 Temperature in fahrenheit is:122



