Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.  
  6. float fahr, celcius;
  7. int lower, upper, step;
  8.  
  9. lower = 0;
  10. upper = 100;
  11. step = 5;
  12.  
  13. celcius = lower;
  14. printf("fahrenheit celcius \n");
  15. while( celcius <= upper){
  16. fahr = celcius*(9.0/5.0)+32;
  17. printf("%6.1f %3.0f\n", fahr, celcius);
  18. celcius=celcius+step;
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement