Advertisement
ivanwidyan

Program That Gets Your Full Name and Print It

Oct 15th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6.    
  7.     string fullname;
  8.  
  9.     cout << "Please enter your full name: ";
  10.     getline(cin, fullname, '\n');
  11.     cout << "Have a nice day " << fullname << endl;
  12.     system("pause");
  13. }
  14.  
  15. Result:
  16. Please enter your full name: Ivan Widyan
  17. Have a nice day Ivan Widyan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement