Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

input c++

cin >> variable;

// sample 1
int x;
cout << "x: ";
cin >> x;
cout << x << endl;

//sample 2
int num;
for (int i = 0; i < 10;  i++){
	cout << "Give a number: ";
    cin >> num;
}
 
PREVIOUS NEXT
Tagged: #input
ADD COMMENT
Topic
Name
6+2 =