fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. float fahr, celsius;
  5. int lower = 0;
  6. int upper = 200;
  7. int step = 10;
  8.  
  9. fahr = upper;
  10. while(fahr >= lower) {
  11. celsius = (5.0/9.0) * (fahr - 32.0);
  12.  
  13. printf("%3.0f\t%4.2f\n", fahr, celsius);
  14. fahr -= step;
  15. }
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
200	93.33
190	87.78
180	82.22
170	76.67
160	71.11
150	65.56
140	60.00
130	54.44
120	48.89
110	43.33
100	37.78
 90	32.22
 80	26.67
 70	21.11
 60	15.56
 50	10.00
 40	4.44
 30	-1.11
 20	-6.67
 10	-12.22
  0	-17.78