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 print and reverse stack functions. Still needs improvement,
[C-Programming-Examples.git]
/
ex_1-3.c
blob
45659b35bc06ae4daa73b2653a79fcb75c809900
1
#include <stdio.h>
2
3
main
()
4
{
5
float
fahr
,
celsius
;
6
int
lower
,
upper
,
step
;
7
8
lower
=
0
;
9
upper
=
300
;
10
step
=
20
;
11
12
fahr
=
lower
;
13
14
printf
(
"Temp Coversion Table
\n
"
);
15
printf
(
"Fah -> Cent
\n
"
);
16
17
while
(
fahr
<=
upper
){
18
celsius
= (
5.0
/
9.0
) * (
fahr
-
32.0
);
19
printf
(
"%3.0f %6.1f
\n
"
,
fahr
,
celsius
);
20
fahr
=
fahr
+
step
;
21
}
22
}