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 tutorial 3-5. Converts int to string of chars with alt base.
[C-Programming-Examples.git]
/
ex_1-15.c
blob
5aba0daeb98061716cd1f0ba8202dd42901ac360
1
#include <stdio.h>
2
3
int
temp_conv
(
int
c
);
4
5
main
()
6
{
7
8
int
i
;
9
10
for
(
i
=
0
;
i
<
300
; ++
i
)
11
printf
(
"%d -> %d
\n
"
,
i
,
temp_conv
(
i
));
12
return
0
;
13
}
14
15
int
temp_conv
(
int
c
)
16
{
17
int
answer
=
5
* (
c
-
32
) /
9
;
18
return
answer
;
19
}