repo.or.cz
/
C-Programming-Examples.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added example 5-7. Reads input lines and stores each line in buffer named lines.
[C-Programming-Examples.git]
/
temp_conv.c
blob
c2249ae41b63044bbe9d29bfdf0b83cc75e11b3d
1
#include <stdio.h>
2
3
main
()
4
{
5
int
fahr
,
celsius
;
6
int
lower
,
upper
,
step
;
7
8
lower
=
0
;
9
upper
=
300
;
10
step
=
20
;
11
12
fahr
=
lower
;
13
while
(
fahr
<=
upper
){
14
celsius
=
5
* (
fahr
-
32
) /
9
;
15
printf
(
"%d
\t
%d
\n
"
,
fahr
,
celsius
);
16
fahr
=
fahr
+
step
;
17
}
18
}