C program to count total number of currency notes
This C program finds the total number of different value {1,5,10} currency notes required to sum upto given amount in rupees (₹).
/* Aim: To Find Number of Currency Notes */
#include<stdio.h>
void main()
{
int amt,N10,N5,N1;
printf("\n Enter amount to withdraw :");
scanf("%d",&amt);
N10=amt/10;
amt=amt%10;
N5=amt/5;
amt=amt%5;
N1=amt/1;
printf("\n There are %d Notes of Rs 10",N10);
printf("\n \n There are %d Notes of Rs 5 ",N5);
printf("\n \n There are %d Notes of Rs 1 \n \n",N1);
}
Output:
Enter amount to withdraw :1000
There are 100 Notes of Rs 10
There are 0 Notes of Rs 5
There are 0 Notes of Rs 1