Thursday, 30 August 2012

A cashier has currency notes of denominations 10, 50 and 100. If the amount to be withdrawn is input through the keyboard in hundreds, find the total number of currency notes of each denomination the cashier will have to give to the withdrawer.


main()
{
 int ten,fifty,hundred,cash;
 printf("Enter amount in multiple of hundred\n");
 scanf("%d",&cash);
 ten=cash/10;
 fifty=cash/50;
 hundred=cash/100;
 printf("Cashier will have to give %d ten rupees notes\n or \nCashier will have to give %d fifty rupees notes\n or \nCashier will have to give %d hundred rupees notes\n",ten,fifty,hundred);
}

output:-

No comments:

Post a Comment