If the variable name is 'age' and the programmer wants to input age, which is the correct syntax?
If the variable name is 'age' and the programmer wants to input age, which is the correct syntax?
Explanation
cin >> age; is the correct syntax in C++ to take input from the user and store it in the variable age.
The >> operator is used with cin to extract the input value into the variable.