Notes.cpp


SUBMITTED BY: Guest

DATE: Oct. 27, 2014, 12:22 p.m.

FORMAT: Text only

SIZE: 910 Bytes

HITS: 731

  1. /*A cashier has currency notes of denominaitons 10, 50 and 100. If the
  2. amount to be with drawn is input through keyboard in hundreds, finf the
  3. total number of currency notes of each denomination the cashier will have
  4. to give to with drawer.*/
  5. #include<iostream.h>
  6. #include<conio.h>
  7. void main()
  8. {
  9. clrscr();
  10. unsigned int input, tend, fiftyd2, fiftyd, hund;
  11. cout<<"Enter amount to be withdrawn\n";cin>>input;
  12. hund=input/100;
  13. fiftyd2=input%100;
  14. fiftyd=fiftyd2/50;
  15. tend=fiftyd2%50;
  16. tend=tend/10;
  17. cout<<"_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-";
  18. cout<<"Here are your "<<hund<<" notes of denomination hundred, "<<fiftyd
  19. <<" notes of denomination fifty \nand "<<tend<<" notes of denmination ten";
  20. getch();
  21. }

comments powered by Disqus