Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- float getCelsius(int);//declaro la función getCelcius, que hace la conversión
- int main(void){
- int fahr;
- for(fahr = 0; fahr <= 300; fahr = fahr + 20 )
- printf("%3d %6.1f\n", fahr, getCelsius(fahr));
- }
- float getCelsius(int fahr)
- {
- return (5.0/9.0)*(fahr-32);
- }
Add Comment
Please, Sign In to add comment