sahajjain01

Enter amount & display no. of Rs.500,100,50,20,10,5,1 notes.

Aug 4th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. //Program to enter an amount and display no. of Rs.500,100,50,20,10,5,1 notes.
  2. #include<iostream.h>
  3. #include<conio.h>
  4. void main()
  5. {
  6.     clrscr();
  7.     int long a;
  8.     cout<<"Enter amount: ";
  9.     cin>>a;
  10.     cout<<"No. of Rs. 500 notes: "<<a/500<<endl;
  11.     a=a%500;
  12.     cout<<"No. of Rs. 100 notes: "<<a/100<<endl;
  13.     a=a%100;
  14.     cout<<"No. of Rs. 50 notes: "<<a/50<<endl;
  15.     a=a%50;
  16.     cout<<"No. of Rs. 20 notes: "<<a/20<<endl;
  17.     a=a%20;
  18.     cout<<"No. of Rs. 10 notes: "<<a/10<<endl;
  19.     a=a%10;
  20.     cout<<"No. of Rs. 5 notes: "<<a/5<<endl;
  21.     a=a%5;
  22.     cout<<"No. of Re. 1 notes: "<<a/1;
  23.     getch();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment