Guest User

Untitled

a guest
May 23rd, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. float getCelsius(int);//declaro la función getCelcius, que hace la conversión
  4.  
  5. int main(void){
  6. int fahr;
  7.  
  8. for(fahr = 0; fahr <= 300; fahr = fahr + 20 )
  9. printf("%3d %6.1f\n", fahr, getCelsius(fahr));
  10. }
  11.  
  12. float getCelsius(int fahr)
  13. {
  14. return (5.0/9.0)*(fahr-32);
  15. }
Add Comment
Please, Sign In to add comment