move to repo.or.cz
[letusc.git] / ch1 / exercises / ex11.c
blobfebdab745da3f98499a21b8b532898291f3ec27a
1 /*currency notes*/
3 #include<stdio.h>
5 int main()
7 int amount;
8 int hun,fif,tens;
9 printf("Enter the amount to be withdrawn: ");
10 scanf("%d",&amount);
12 /*assume the amount is 4320*/
14 hun = (amount / 100)-1;
15 fif = 2;
17 amount = amount /10;
18 tens = amount%10;
20 printf("100s: %d\n",hun);
21 printf("50s: %d\n",fif);
22 printf("10s: %d\n",tens);
24 return 0;