From c813f7bd522baf1057ba9bee874669ea5b945a66 Mon Sep 17 00:00:00 2001 From: "martin@ashbysoft.com" Date: Sat, 11 Jun 2022 20:02:48 +0000 Subject: more intro exercises --- fahr-celc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fahr-celc.c') diff --git a/fahr-celc.c b/fahr-celc.c index ccef413..ac3c2fc 100644 --- a/fahr-celc.c +++ b/fahr-celc.c @@ -3,9 +3,9 @@ /* print farenheight-celcius conversion table for 0, 20, ...300 */ int main() { - for (float fahr=0.0; - fahr<=300.0; - fahr+=20.0) { + for (float fahr=300.0; + fahr>=0.0; + fahr-=20.0) { printf("%3.0f %6.1f\n", fahr, (5.0/9.0)*(fahr-32.0)); -- cgit v1.2.3-ZIG