fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. float fahr, celsius;
  5. int lower, upper, step;
  6. lower=0; /* limite inferiore della tabella */
  7. upper=300; /* limite superiore */
  8. step=20; /* incremento */
  9. fahr=lower;
  10. while (fahr<=upper)
  11. {
  12. celsius=(5.0/9.0)*(fahr-32);
  13. printf("%3.0f %6.1f\n", fahr, celsius);
  14. fahr=fahr+step;
  15. }
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 4464KB
stdin
Standard input is empty
stdout
  0  -17.8
 20   -6.7
 40    4.4
 60   15.6
 80   26.7
100   37.8
120   48.9
140   60.0
160   71.1
180   82.2
200   93.3
220  104.4
240  115.6
260  126.7
280  137.8
300  148.9