fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. double c1, c2, i, f;
  7.  
  8. cout << "Enter the lowest temperature: " << endl;
  9. cin >> c1;
  10. cout << "Enter the highest temperature: " << endl;
  11. cin >> c2;
  12. cout << "Enter the desired increment in temperature: " << endl;
  13. cin >> i;
  14.  
  15. for (double c = c1; c <= c2; c = c + i)
  16. {
  17. f = ((9.0 / 5) * c) + 32;
  18. cout << "When C is " << c << " degrees Celsius, the temperature in Fahrenheit will be: " << f << " degrees." << endl;
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0s 3472KB
stdin
10 100 1
stdout
Enter the lowest temperature: 
Enter the highest temperature: 
Enter the desired increment in temperature: 
When C is 10 degrees Celsius, the temperature in Fahrenheit will be: 50 degrees.
When C is 11 degrees Celsius, the temperature in Fahrenheit will be: 51.8 degrees.
When C is 12 degrees Celsius, the temperature in Fahrenheit will be: 53.6 degrees.
When C is 13 degrees Celsius, the temperature in Fahrenheit will be: 55.4 degrees.
When C is 14 degrees Celsius, the temperature in Fahrenheit will be: 57.2 degrees.
When C is 15 degrees Celsius, the temperature in Fahrenheit will be: 59 degrees.
When C is 16 degrees Celsius, the temperature in Fahrenheit will be: 60.8 degrees.
When C is 17 degrees Celsius, the temperature in Fahrenheit will be: 62.6 degrees.
When C is 18 degrees Celsius, the temperature in Fahrenheit will be: 64.4 degrees.
When C is 19 degrees Celsius, the temperature in Fahrenheit will be: 66.2 degrees.
When C is 20 degrees Celsius, the temperature in Fahrenheit will be: 68 degrees.
When C is 21 degrees Celsius, the temperature in Fahrenheit will be: 69.8 degrees.
When C is 22 degrees Celsius, the temperature in Fahrenheit will be: 71.6 degrees.
When C is 23 degrees Celsius, the temperature in Fahrenheit will be: 73.4 degrees.
When C is 24 degrees Celsius, the temperature in Fahrenheit will be: 75.2 degrees.
When C is 25 degrees Celsius, the temperature in Fahrenheit will be: 77 degrees.
When C is 26 degrees Celsius, the temperature in Fahrenheit will be: 78.8 degrees.
When C is 27 degrees Celsius, the temperature in Fahrenheit will be: 80.6 degrees.
When C is 28 degrees Celsius, the temperature in Fahrenheit will be: 82.4 degrees.
When C is 29 degrees Celsius, the temperature in Fahrenheit will be: 84.2 degrees.
When C is 30 degrees Celsius, the temperature in Fahrenheit will be: 86 degrees.
When C is 31 degrees Celsius, the temperature in Fahrenheit will be: 87.8 degrees.
When C is 32 degrees Celsius, the temperature in Fahrenheit will be: 89.6 degrees.
When C is 33 degrees Celsius, the temperature in Fahrenheit will be: 91.4 degrees.
When C is 34 degrees Celsius, the temperature in Fahrenheit will be: 93.2 degrees.
When C is 35 degrees Celsius, the temperature in Fahrenheit will be: 95 degrees.
When C is 36 degrees Celsius, the temperature in Fahrenheit will be: 96.8 degrees.
When C is 37 degrees Celsius, the temperature in Fahrenheit will be: 98.6 degrees.
When C is 38 degrees Celsius, the temperature in Fahrenheit will be: 100.4 degrees.
When C is 39 degrees Celsius, the temperature in Fahrenheit will be: 102.2 degrees.
When C is 40 degrees Celsius, the temperature in Fahrenheit will be: 104 degrees.
When C is 41 degrees Celsius, the temperature in Fahrenheit will be: 105.8 degrees.
When C is 42 degrees Celsius, the temperature in Fahrenheit will be: 107.6 degrees.
When C is 43 degrees Celsius, the temperature in Fahrenheit will be: 109.4 degrees.
When C is 44 degrees Celsius, the temperature in Fahrenheit will be: 111.2 degrees.
When C is 45 degrees Celsius, the temperature in Fahrenheit will be: 113 degrees.
When C is 46 degrees Celsius, the temperature in Fahrenheit will be: 114.8 degrees.
When C is 47 degrees Celsius, the temperature in Fahrenheit will be: 116.6 degrees.
When C is 48 degrees Celsius, the temperature in Fahrenheit will be: 118.4 degrees.
When C is 49 degrees Celsius, the temperature in Fahrenheit will be: 120.2 degrees.
When C is 50 degrees Celsius, the temperature in Fahrenheit will be: 122 degrees.
When C is 51 degrees Celsius, the temperature in Fahrenheit will be: 123.8 degrees.
When C is 52 degrees Celsius, the temperature in Fahrenheit will be: 125.6 degrees.
When C is 53 degrees Celsius, the temperature in Fahrenheit will be: 127.4 degrees.
When C is 54 degrees Celsius, the temperature in Fahrenheit will be: 129.2 degrees.
When C is 55 degrees Celsius, the temperature in Fahrenheit will be: 131 degrees.
When C is 56 degrees Celsius, the temperature in Fahrenheit will be: 132.8 degrees.
When C is 57 degrees Celsius, the temperature in Fahrenheit will be: 134.6 degrees.
When C is 58 degrees Celsius, the temperature in Fahrenheit will be: 136.4 degrees.
When C is 59 degrees Celsius, the temperature in Fahrenheit will be: 138.2 degrees.
When C is 60 degrees Celsius, the temperature in Fahrenheit will be: 140 degrees.
When C is 61 degrees Celsius, the temperature in Fahrenheit will be: 141.8 degrees.
When C is 62 degrees Celsius, the temperature in Fahrenheit will be: 143.6 degrees.
When C is 63 degrees Celsius, the temperature in Fahrenheit will be: 145.4 degrees.
When C is 64 degrees Celsius, the temperature in Fahrenheit will be: 147.2 degrees.
When C is 65 degrees Celsius, the temperature in Fahrenheit will be: 149 degrees.
When C is 66 degrees Celsius, the temperature in Fahrenheit will be: 150.8 degrees.
When C is 67 degrees Celsius, the temperature in Fahrenheit will be: 152.6 degrees.
When C is 68 degrees Celsius, the temperature in Fahrenheit will be: 154.4 degrees.
When C is 69 degrees Celsius, the temperature in Fahrenheit will be: 156.2 degrees.
When C is 70 degrees Celsius, the temperature in Fahrenheit will be: 158 degrees.
When C is 71 degrees Celsius, the temperature in Fahrenheit will be: 159.8 degrees.
When C is 72 degrees Celsius, the temperature in Fahrenheit will be: 161.6 degrees.
When C is 73 degrees Celsius, the temperature in Fahrenheit will be: 163.4 degrees.
When C is 74 degrees Celsius, the temperature in Fahrenheit will be: 165.2 degrees.
When C is 75 degrees Celsius, the temperature in Fahrenheit will be: 167 degrees.
When C is 76 degrees Celsius, the temperature in Fahrenheit will be: 168.8 degrees.
When C is 77 degrees Celsius, the temperature in Fahrenheit will be: 170.6 degrees.
When C is 78 degrees Celsius, the temperature in Fahrenheit will be: 172.4 degrees.
When C is 79 degrees Celsius, the temperature in Fahrenheit will be: 174.2 degrees.
When C is 80 degrees Celsius, the temperature in Fahrenheit will be: 176 degrees.
When C is 81 degrees Celsius, the temperature in Fahrenheit will be: 177.8 degrees.
When C is 82 degrees Celsius, the temperature in Fahrenheit will be: 179.6 degrees.
When C is 83 degrees Celsius, the temperature in Fahrenheit will be: 181.4 degrees.
When C is 84 degrees Celsius, the temperature in Fahrenheit will be: 183.2 degrees.
When C is 85 degrees Celsius, the temperature in Fahrenheit will be: 185 degrees.
When C is 86 degrees Celsius, the temperature in Fahrenheit will be: 186.8 degrees.
When C is 87 degrees Celsius, the temperature in Fahrenheit will be: 188.6 degrees.
When C is 88 degrees Celsius, the temperature in Fahrenheit will be: 190.4 degrees.
When C is 89 degrees Celsius, the temperature in Fahrenheit will be: 192.2 degrees.
When C is 90 degrees Celsius, the temperature in Fahrenheit will be: 194 degrees.
When C is 91 degrees Celsius, the temperature in Fahrenheit will be: 195.8 degrees.
When C is 92 degrees Celsius, the temperature in Fahrenheit will be: 197.6 degrees.
When C is 93 degrees Celsius, the temperature in Fahrenheit will be: 199.4 degrees.
When C is 94 degrees Celsius, the temperature in Fahrenheit will be: 201.2 degrees.
When C is 95 degrees Celsius, the temperature in Fahrenheit will be: 203 degrees.
When C is 96 degrees Celsius, the temperature in Fahrenheit will be: 204.8 degrees.
When C is 97 degrees Celsius, the temperature in Fahrenheit will be: 206.6 degrees.
When C is 98 degrees Celsius, the temperature in Fahrenheit will be: 208.4 degrees.
When C is 99 degrees Celsius, the temperature in Fahrenheit will be: 210.2 degrees.
When C is 100 degrees Celsius, the temperature in Fahrenheit will be: 212 degrees.