Showing
1 changed file
with
5 additions
and
1 deletions
| ... | @@ -5,7 +5,11 @@ using namespace std; | ... | @@ -5,7 +5,11 @@ using namespace std; |
| 5 | int main() | 5 | int main() |
| 6 | { | 6 | { |
| 7 | string input; | 7 | string input; |
| 8 | + cout << "If you enter 'exit', the program will exit." << endl; | ||
| 8 | getline(cin, input); | 9 | getline(cin, input); |
| 9 | - cout << "Input : " << input << endl; | 10 | + if (input == "exit") |
| 11 | + return 0; | ||
| 12 | + else | ||
| 13 | + cout << "Input : " << input << endl; | ||
| 10 | return 0; | 14 | return 0; |
| 11 | } | 15 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment