Advertisement
wigllytest

Untitled

Aug 9th, 2020
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2. //#include <string>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8.  
  9. string destination;
  10. //getline(cin, destination);
  11. cin >> destination;
  12.  
  13. while (destination != "End")
  14. {
  15. int vacationMoney;
  16. cin >> vacationMoney;
  17. int money = 0;
  18.  
  19. while (vacationMoney > money)
  20. {
  21. int moneySaved;
  22. cin >> moneySaved;
  23. money += moneySaved;
  24. }
  25. cout << "Going to " << destination << "!" << endl;
  26. //cin.ignore();
  27. //getline(cin, destination);
  28. cin >> destination;
  29. }
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement