#includeusing namespace std; int main() { int num; cout << "Enter a number: "; cin >> num; cout << "You have entered: " << num << endl; return 0; }
#includeIn this code, the user is prompted to enter their name and the input is read using the `getline` function. The entered name is then displayed using the `cout` object. The cpp Stream read feature is part of the C++ standard library and does not require any external package or library.#include using namespace std; int main() { string name; cout << "Enter your name: "; getline(cin, name); cout << "Hello, " << name << "!" << endl; return 0; }