Showing
1 changed file
with
20 additions
and
0 deletions
B/exit.cpp
0 → 100644
1 | +#include<iostream> | ||
2 | +#include<string> | ||
3 | +using namespace std; | ||
4 | + | ||
5 | +int main() { | ||
6 | + string text; | ||
7 | + | ||
8 | + cout << "Please enter the sentence..." << endl << endl; | ||
9 | + | ||
10 | + cout << ": "; | ||
11 | + | ||
12 | + cin >> text; | ||
13 | + | ||
14 | + if (text == "exit") | ||
15 | + exit(100); | ||
16 | + else | ||
17 | + cout << endl << text << endl; | ||
18 | + | ||
19 | + return 0; | ||
20 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment