+ 2

I don't understand com 100%

I still don't understand how to properly use cin. Its for input. But what does it mean to input. Like input num1 or num 2 I don't know what that does

13th Apr 2018, 5:26 PM
(Dreadlord450)
(Dreadlord450) - avatar
9 Respostas
+ 9
cin is the console input which is used to take input from user cout is console output which is used to show the input number at console ex:- #include <iostream> int main() { int a,b; std::cin>>a>>b;//input std::cout<<a*b;//output shows at console return 0; }
13th Apr 2018, 5:36 PM
GAWEN STEASY
GAWEN STEASY - avatar
+ 3
cin assigns your input as a value to given variable cin simply means (Console In) its reads input stream from your keyboard Using GAWEN STEASY sample you can see that she has 2 variables that need input from keyboard(cin), once there value has been assigned these 2 variables are then multiplied together and displayed to console 👍
13th Apr 2018, 5:50 PM
D_Stark
D_Stark - avatar
+ 3
cin is an object of class istream. It is used to accept the input from the standard input device
16th May 2018, 2:51 PM
Sadaam Linux
Sadaam Linux - avatar
+ 1
you can assign by int a; a = 5; see variable a is assigned with value 5. its proper way to assign u can assign value like this also int a = 5;
14th Apr 2018, 1:36 PM
Mushtaq Khan
Mushtaq Khan - avatar
+ 1
I can see clearly now the rain is gone
17th Apr 2018, 12:30 PM
(Dreadlord450)
(Dreadlord450) - avatar
0
got it thanks a lot man I love this app everything is so much easier this way with immediate help
13th Apr 2018, 8:51 PM
(Dreadlord450)
(Dreadlord450) - avatar
0
actually another question would be how to properly assign something to a variable
14th Apr 2018, 1:24 AM
(Dreadlord450)
(Dreadlord450) - avatar
0
if u can assign a variable with out using cin then what do we need cin for any way pls use an example a 3rd grader could understand even though I'm in 9th
16th Apr 2018, 10:15 PM
(Dreadlord450)
(Dreadlord450) - avatar
0
cin basically console input (cin) its mean something coming from keyboard by using cin, we make options for user that they can put their choice suppose it there is a program to make a table so you can make a table of any digit which u put through cin function here is a code in which 2 variables are given a and length https://code.sololearn.com/cwE3Gy0SutPO/?ref=app
17th Apr 2018, 4:04 AM
Mushtaq Khan
Mushtaq Khan - avatar