From db1aa6df409344dc37c6c6e42277c159438bed8c Mon Sep 17 00:00:00 2001 From: celso Date: Sat, 5 Nov 2022 18:18:13 -0300 Subject: [PATCH] fifteenth exercise --- 1-15.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 1-15.c diff --git a/1-15.c b/1-15.c new file mode 100644 index 0000000..0463d49 --- /dev/null +++ b/1-15.c @@ -0,0 +1,10 @@ +#include +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)); + } +}