repo.or.cz
/
letusc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
move to repo.or.cz
[letusc.git]
/
ch1
/
exercises
/
ex11.c
blob
febdab745da3f98499a21b8b532898291f3ec27a
1
/*currency notes*/
2
3
#include<stdio.h>
4
5
int
main
()
6
{
7
int
amount
;
8
int
hun
,
fif
,
tens
;
9
printf
(
"Enter the amount to be withdrawn: "
);
10
scanf
(
"%d"
,&
amount
);
11
12
/*assume the amount is 4320*/
13
14
hun
= (
amount
/
100
)-
1
;
15
fif
=
2
;
16
17
amount
=
amount
/
10
;
18
tens
=
amount
%
10
;
19
20
printf
(
"100s: %d
\n
"
,
hun
);
21
printf
(
"50s: %d
\n
"
,
fif
);
22
printf
(
"10s: %d
\n
"
,
tens
);
23
24
return
0
;
25
}