Advertisement
Kagalive

Intro to Strings

Sep 30th, 2020
1,148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. //Intro to strings
  2.  
  3. #include <iostream>
  4. #include <string>
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.    cout << "Enter your name: ";
  10.    string name{};
  11.    cin >> name;
  12.  
  13.    cout << '\n';
  14.    cout << "Hi, " << name << "!\n";
  15.    cout << "I'm CPU! :-)\n";
  16.  
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement