summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 18:01:13 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 18:01:13 +0800
commit2d6fda53f98a3b7614cd441e6d521aed8421d386 (patch)
treebd2f211ce24c6d16954822c43f4fa9b0b1625f38
parent8cdb0c05bc3180660a6272e0b9423f66f233bc9b (diff)
downloadk&r-exercises-2d6fda53f98a3b7614cd441e6d521aed8421d386.tar.gz
1.4
-rw-r--r--1/4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/1/4.c b/1/4.c
index 3416e02..653b530 100644
--- a/1/4.c
+++ b/1/4.c
@@ -12,7 +12,7 @@ int main(int argc, char *argv[]) {
printf("celsius\tfahrenheit\n");
while (celsius <= upper) {
- fahr = (9.0 * celsius / 5.0) + 32.0;
+ fahr = (celsius * 9.0 / 5.0) + 32.0;
printf("%7.0f\t%10.1f\n", celsius, fahr);
celsius = celsius + step;
}