+ 1

how to accept user input???

what i have to write when ''Seems like your program requires input'' shows ?? on that function #include <iostream> using namespace std; int main() { int a; cout << a+5; cin >> a; cout << a; return 0; } give me some examples, please... i cant understand :/

4th Nov 2016, 11:13 AM
dghi
dghi - avatar
3 Réponses
+ 2
cout is used to send output to console and cin use for input that take user input in your program cin has used for get value from user and insert it to variable, it is compulsory to store data in a variable.
4th Nov 2016, 11:21 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
4th Nov 2016, 11:11 AM
Sahand Mirzaee
Sahand Mirzaee - avatar
+ 1
thx :)
4th Nov 2016, 11:26 AM
dghi
dghi - avatar