summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 17:44:40 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 17:44:40 +0800
commit7acc722bc45f225fde82a6b1bc7729782bc79dfb (patch)
tree322fd963050c937aa8b5b195a0afe9847358d799
parentd95a93c2269819710e89deb6850c596c7e32c663 (diff)
downloadk&r-exercises-7acc722bc45f225fde82a6b1bc7729782bc79dfb.tar.gz
1.3
-rw-r--r--1/3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/1/3.c b/1/3.c
index 802e1c0..1360673 100644
--- a/1/3.c
+++ b/1/3.c
@@ -9,11 +9,11 @@ int main(int argc, char *argv[]) {
step = 20;
fahr = lower;
- printf("fahr\tcelsius\n");
+ printf("fahrenheit\tcelsius\n");
while (fahr <= upper) {
celsius = (5.0 / 9.0) * (fahr - 32.0);
- printf("%4.0f\t%7.1f\n", fahr, celsius);
+ printf("%10.0f\t%7.1f\n", fahr, celsius);
fahr = fahr + step;
}