C++ program to print an User defined data of a integer variable

C++ program to print an User defined data of a integer variable

How to take an "int" type user input in C++? A user can take input using cin, and the number is printed on screen using cout.

C++ program to print user given input (Integer) :



#include <iostream> using namespace std; int main() { int x; cout << "Input the number you want to print = "; cin >> x; cout << "The Number is : " << x; return 0; }

Output :