Guest User

Untitled

a guest
May 23rd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. /* print fahrenheit-celcius table */
  4.  
  5. double convert(int a)
  6. {
  7. double u;
  8.  
  9. u = (a - 32) * (5.0/9.0);
  10. return u;
  11. }
  12.  
  13. main()
  14. {
  15. int f;
  16.  
  17. for (f = 0; f <= 300; f = f + 20)
  18. printf("%3d %6.1f\n", f, convert(f));
  19.  
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment