#include #include using namespace std; /* Get the variables from user with different variable types */ int main() { int myint; string mystr, mystr2; char mychar, mychar2; double mydouble; cout << "Enter one string for getline: "; getline(cin, mystr2); cout << "This is my string with getline: " << mystr2 << endl << endl; cout << "Enter a string for cin: "; cin >> mystr; cout << "This is my string with cin: " << mystr << endl << endl; cout << "Enter a char for get :" << endl; cin.get(mychar2); cout << "This is my char with get :" << mychar2 << endl << endl; cout << "Enter a char for cin: " ; cin >> mychar; cout << "This is my char with cin :" << mychar << endl << endl; cout << "Enter an integer value: "; cin >> myint; cout << "This is the typed integer: " << myint << endl << endl; cout << "Enter a double: "; cin >> mydouble; cout << "This is the typed double: " << mydouble << endl << endl; return 0; }