Advertisement
wigllytest

Untitled

Aug 9th, 2020
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 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. double vacationMoney;
  16. //int vacationMoney;
  17. cin >> vacationMoney;
  18. //int money = 0;
  19. double money = 0;
  20.  
  21. while (vacationMoney > money)
  22. {
  23. //int moneySaved;
  24. double moneySaved;
  25.  
  26. cin >> moneySaved;
  27. money += moneySaved;
  28. }
  29. cout << "Going to " << destination << "!" << endl;
  30. //cin.ignore();
  31. //getline(cin, destination);
  32. cin >> destination;
  33. }
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement