C++ Program to count Currency needed for a Entered Money

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x,y,z,q,w;
cout<<"Enter Money in Rupees:- ";
cin>>x;
y=x/100;
x=x%100;
z=x/50;
x=x%50;
q=x/10;
x=x%10;
w=x;
cout<<"100 Rupees note needed:- "<<y<<endl;
cout<<"50 Rupees note needed:- "<<z<<endl;
cout<<"10 Rupees note needed:- "<<q<<endl;
cout<<"1 Rupee note needed:- "<<w;
getch();
}

OUTPUT:-

money

Leave a Reply

Your email address will not be published. Required fields are marked *