Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to get input in cpp

// i/o example

#include <iostream>
using namespace std;

int main ()
{
  int i;
  cout << "Please enter an integer value: ";
  cin >> i;
  cout << "The value you entered is " << i;
  return 0;
}
Source by www.cplusplus.com #
 
PREVIOUS NEXT
Tagged: #input #cpp
ADD COMMENT
Topic
Name
4+3 =