fork download
  1. /* Um problema clássico com algumas modificações */
  2. #include<stdio.h>
  3. #include<stdlib.h>
  4.  
  5. int main(int argc, const char** argv)
  6. {
  7. int fahr, celsius;
  8. const int lower=10, upper=300, step=10;
  9.  
  10. fahr = lower;
  11.  
  12. while(fahr<=upper)
  13. {
  14. celsius=5*(fahr-32)/9;
  15. printf("%i\t%d\n",fahr,celsius);
  16. fahr+=step;
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
10	-12
20	-6
30	-1
40	4
50	10
60	15
70	21
80	26
90	32
100	37
110	43
120	48
130	54
140	60
150	65
160	71
170	76
180	82
190	87
200	93
210	98
220	104
230	110
240	115
250	121
260	126
270	132
280	137
290	143
300	148