/*
Cashier has currency notes of denomination 1, 5, 10. Accept the
amount to be withdrawn from the user and print total number of
currency notes of each denomination the cashier will have to give
to the user
*/
#include<stdio.h>
main()
{
int n,t,T,E,O;
printf("Enter amount- ");
scanf("%d",&n);
T=n/10;
t=n%10;
E=t/5;
O=t%5;
printf("The cashier gives-\n");
printf("%d notes of 10, %d notes of 5 and %d notes of 1.\n",T,E,O);
}
No comments:
Post a Comment