Showing
1 changed file
with
28 additions
and
0 deletions
EchoProgram/main.cpp
0 → 100644
| 1 | +#include<iostream> | ||
| 2 | +#include<string> | ||
| 3 | +using namespace std; | ||
| 4 | + | ||
| 5 | +int main() | ||
| 6 | +{ | ||
| 7 | + while (1) | ||
| 8 | + { | ||
| 9 | + | ||
| 10 | + string message; | ||
| 11 | + cout << "input your message : "; | ||
| 12 | + getline(cin, message); | ||
| 13 | + if (message == "exit") | ||
| 14 | + { | ||
| 15 | + cout << "exit program!" << endl; | ||
| 16 | + system("pause"); | ||
| 17 | + return 0; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + cout << "your message :" << message << endl; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + system("pause"); | ||
| 27 | + return 0; | ||
| 28 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment