take input in integer c++ code example
Example: take integer input in c++
#include <iostream>
using namespace std;
int main() {
//Declare an int variable
int a;
//take input using the standard cin operator
cin >> a;
//display the integer
cout << a;
return 0;
}