Showing
1 changed file
with
8 additions
and
1 deletions
1 | #include <iostream> | 1 | #include <iostream> |
2 | +#include <cstdlib> | ||
3 | +#include <string> | ||
2 | using namespace std; | 4 | using namespace std; |
3 | 5 | ||
4 | void HelloWorld() | 6 | void HelloWorld() |
5 | { | 7 | { |
6 | - cout << "Hello World!" << endl; | 8 | + string a; |
9 | + cin >> a; | ||
10 | + if (a == "exit") | ||
11 | + exit(0); | ||
12 | + else | ||
13 | + cout << "Hello World!" << endl; | ||
7 | } | 14 | } |
8 | 15 | ||
9 | int main() | 16 | int main() | ... | ... |
-
Please register or login to post a comment