cin x c++ code example
Example 1: cin in c++
cin >> varName;
Example 2: cin statement c++
#include <iostream>
using namespace std;
int main() {
string nameEntered;
cout << "Enter your name: \n";
cin >> nameEntered;
cout << "So, your name is " << nameEntered;
return 0;
}