Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- while (true)
- {
- string destination;
- cin >> destination;
- if (!destination.compare("End"))
- break;
- double expences;
- cin >> expences;
- double savings = 0, money;
- while (savings < expences)
- {
- cin >> money;
- savings += money;
- }
- cout << "Going to " << destination << "!\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement