C++ Program to enter an amount and display no. of Rs.500,100,50,20,10,5,1 notes.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int long a;
cout<<"Enter amount: ";
cin>>a;
cout<<"No. of Rs. 500 notes: "<<a/500<<endl;
a=a%500;
cout<<"No. of Rs. 100 notes: "<<a/100<<endl;
a=a%100;
cout<<"No. of Rs. 50 notes: "<<a/50<<endl;
a=a%50;
cout<<"No. of Rs. 20 notes: "<<a/20<<endl;
a=a%20;
cout<<"No. of Rs. 10 notes: "<<a/10<<endl;
a=a%10;
cout<<"No. of Rs. 5 notes: "<<a/5<<endl;
a=a%5;
cout<<"No. of Re. 1 notes: "<<a/1;
getch();
}