fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. float fahrenheit, celsius;
  7.  
  8. float beach = 80;
  9. float hiking1 = 65 ,hiking2 = 70;
  10. float sightseeing1 = 40, sightseeing2 = 65;
  11. float skiing1= 25, skiing2=40;
  12. float reading = 25;
  13.  
  14.  
  15. printf("\nAbove %.0f beach", beach);
  16.  
  17. printf("\nBetween %.0f and %.0f hiking", hiking1, hiking2);
  18.  
  19. printf("\nBetween %.0f and %.0f sightseeing", sightseeing1,sightseeing2);
  20.  
  21. printf("\nBetween %.0f and %.0f skiing", skiing1, skiing2);
  22.  
  23. printf("\nBelow %.0f reading", reading);
  24.  
  25.  
  26. //Convert Fahrenheit to Celsius
  27.  
  28. printf("\nEnter Fahrenheit temperature: ");
  29. scanf("%.0f", &fahrenheit);
  30.  
  31. celsius= (fahrenheit - 32)/ 1.8;
  32.  
  33. printf("\nCelsius conversion : %.0f", celsius);
  34.  
  35. return 0;
  36. }
Success #stdin #stdout 0s 3348KB
stdin
Standard input is empty
stdout
Above 80 beach
Between 65 and 70 hiking
Between 40 and 65 sightseeing
Between 25 and 40 skiing
Below 25 reading
Enter Fahrenheit temperature: 
Celsius conversion : -18