Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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;
}
 
PREVIOUS NEXT
Tagged: #integer #input
ADD COMMENT
Topic
Name
5+9 =