fork download
  1. #include<stdio.h>
  2. void main()
  3. {
  4. float farenheit,celsius;
  5. int lower_bound=0,upper_bound=300,step=20;
  6. printf("CELSIUS FARENHIET\n");
  7. printf("-------- -----------\n");
  8. celsius=lower_bound;
  9. while(celsius<=upper_bound)
  10. {
  11. farenheit=(9/5)*celsius+32;
  12. printf("%f %f\n",celsius,farenheit);
  13. celsius+=step;
  14.  
  15. }
  16.  
  17. }
  18.  
Runtime error #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
CELSIUS        FARENHIET
--------       -----------
0.000000        32.000000
20.000000        52.000000
40.000000        72.000000
60.000000        92.000000
80.000000        112.000000
100.000000        132.000000
120.000000        152.000000
140.000000        172.000000
160.000000        192.000000
180.000000        212.000000
200.000000        232.000000
220.000000        252.000000
240.000000        272.000000
260.000000        292.000000
280.000000        312.000000
300.000000        332.000000