morn'n !
i've got the code ...and its my 1st code
thnx in advance ..... :smartas
//******************************
// -=shivesh=-
//******************************
// source code
//******************************
#include <iostream.h>
#include <conio.h>
void main()
{
clrscr();
long amt,n1,n2,n3,n4,n5,n6,n7,n8,n9,tot;
cout<<"enter the amount :-\n";
cin>>amt;
n1=amt/1000;
amt=amt%1000;
n2=amt/500;
amt=amt%500;
n3=amt/100;
amt=amt%100;
n4=amt/50;
amt=amt%50;
n5=amt/20;
amt=amt%20;
n6=amt/10;
amt=amt%10;
n7=amt/5;
amt=amt%5;
n8=amt/2;
n9=amt%2;
tot=n1+n2+n3+n4+n5+n6+n7+n8+n9;
cout<<"\n\nTHE TOTAL NUMBER OF NOTES ARE :-\n\n";
cout<<"no. of 1000 notes = "<<n1<<endl<<"no. of 500 notes = "<<n2<<endl<<"no. of 100 notes = "<<n3<<endl<<"no. of 50 notes = "<<n4<<endl<<"no. of 20 notes = "<<n5<<endl<<"no. of 10 notes = "<<n6<<endl<<"no. of 5 notes = "<<n7<<endl<<"no. of 2 notes = "<<n8<<endl<<"no. of 1 notes = "<<n9<<endl<<"no. of total notes = "<<tot;
getch();
}
//**********************************
// #END#
//**********************************

New Topic/Question
Reply


MultiQuote







|