0

What is cin used for in c++

13th Apr 2017, 5:08 AM
sharabh mishra
sharabh mishra - avatar
6 Respostas
+ 11
E.g. int x; // initialise variable cin >> x; // user input to variable cout << x; // outputs variable to console cout : console output cin : console input
13th Apr 2017, 5:16 AM
Hatsy Rei
Hatsy Rei - avatar
+ 3
to get user input
13th Apr 2017, 5:13 AM
Mario L.
Mario L. - avatar
+ 2
so cin is used to give information about the variable
13th Apr 2017, 5:18 AM
sharabh mishra
sharabh mishra - avatar
+ 2
thxxx every one
13th Apr 2017, 5:22 AM
sharabh mishra
sharabh mishra - avatar
+ 1
when we use cout to get the value of our program so why there is a need for cin
13th Apr 2017, 5:15 AM
sharabh mishra
sharabh mishra - avatar
+ 1
cin is the standard input stream object, which retrieves console input. It is tied to, but distinct in purpose from, cout, the standard output stream, which prints to the console. Simply stated, cin gets user input, whilst cout displays output to the user.
13th Apr 2017, 5:21 AM
Zack Strickland
Zack Strickland - avatar