- To take users input & print
User Input: 12
Output: 12
#include <iostream>
using namespace std;
int main() {
int num;
cout<<"Enter a number :";
cin>>num;
cout<<"You entered : "<<num;
return 0;
}
Enter a number : 121 You entered : 121Program
cin>>variableName; //to take user input
cout<<variableName; //to print variable
To take input, use cin>>
to store your input inside a variable and
to show the variable in the output screen just use cout<<
(type variableName after it)
Coming Soon !
QuickThe dreams I chased took me on a journey, a journey more rewarding than the goals