SHOW:
|
|
- or go back to the newest paste.
1 | //***************************************************************************** | |
2 | //A slightly more advanced and personal "Hello World" program | |
3 | //***************************************************************************** | |
4 | ||
5 | #include <iostream> | |
6 | #include <string> | |
7 | ||
8 | using namespace std; | |
9 | ||
10 | int main() | |
11 | { | |
12 | string name; | |
13 | ||
14 | cout << endl << "Hi there. What's your name?" << endl; | |
15 | getline(cin, name); //get a line of characters for the name variable | |
16 | cout << endl << "Hello World and more specifically, "<< name | |
17 | << "!" << endl << endl; | |
18 | ||
19 | return 0; | |
20 | } |