summaryrefslogtreecommitdiffstats
path: root/1/3.c
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 17:57:59 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-11-14 17:57:59 +0800
commit8cdb0c05bc3180660a6272e0b9423f66f233bc9b (patch)
tree51f41b7eb87471f86ecbc696db2464518f016ba6 /1/3.c
parent7acc722bc45f225fde82a6b1bc7729782bc79dfb (diff)
downloadk&r-exercises-8cdb0c05bc3180660a6272e0b9423f66f233bc9b.tar.gz
1.4
Diffstat (limited to '1/3.c')
-rw-r--r--1/3.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/1/3.c b/1/3.c
index 1360673..d0c8ea1 100644
--- a/1/3.c
+++ b/1/3.c
@@ -1,21 +1,21 @@
#include <stdio.h>
int main(int argc, char *argv[]) {
- float fahr, celsius;
- int lower, upper, step;
+ float fahr, celsius;
+ int lower, upper, step;
- lower = 0;
- upper = 300;
- step = 20;
- fahr = lower;
+ lower = 0;
+ upper = 300;
+ step = 20;
+ fahr = lower;
- printf("fahrenheit\tcelsius\n");
+ printf("fahrenheit\tcelsius\n");
- while (fahr <= upper) {
- celsius = (5.0 / 9.0) * (fahr - 32.0);
- printf("%10.0f\t%7.1f\n", fahr, celsius);
- fahr = fahr + step;
- }
+ while (fahr <= upper) {
+ celsius = (5.0 / 9.0) * (fahr - 32.0);
+ printf("%10.0f\t%7.1f\n", fahr, celsius);
+ fahr = fahr + step;
+ }
- return 0;
+ return 0;
} \ No newline at end of file