Guest User

Untitled

a guest
Oct 17th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int mynt[] = {5000,2000,1000,500,100,50,10,5,1};
  7. int upphaed(0);
  8.  
  9. cout << "how much money do you have? ";
  10. cin >> upphaed;
  11.  
  12. for(int i = 0; i < 9;++i)
  13. {
  14. cout << upphaed / mynt[i] << " x " << mynt[i] << "kr\n";
  15. upphaed %= mynt[i];
  16. }
  17. }
Add Comment
Please, Sign In to add comment