fifteenth exercise

This commit is contained in:
celso 2022-11-05 18:18:13 -03:00
parent 6903b56e08
commit db1aa6df40
1 changed files with 10 additions and 0 deletions

10
1-15.c Normal file
View File

@ -0,0 +1,10 @@
#include <stdio.h>
double fahr_to_celsius(int fahr){
return (5.0/9.0)*(fahr-32);
}
int main(){
int fahr;
for (fahr=300; fahr>=0; fahr-=20){
printf("%3d %6.1f\n", fahr, fahr_to_celsius(fahr));
}
}