Advertisement
nastyac

C1

Feb 22nd, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int fahr;
  6. float in_celsius(int fahr);
  7. for ( fahr = 0; fahr <= 300; fahr += 20)
  8. printf("%3d %6.1f\n", fahr, in_celsius(fahr));
  9. }
  10.  
  11. float in_celsius(int fahr)
  12. {
  13. float c;
  14. c = (5.0/9.0)*(fahr - 32);
  15. return c;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement