+ 2

Is it that right

cin is used to take the information from the user . cout is used to show the final value

24th Nov 2016, 7:13 PM
Vladeto
Vladeto - avatar
2 Antworten
+ 3
cout outputs the current value of x. int x=2; cout << x; // output: 2 // now we are changing x to 10 x=10; cout << x; // output: 10
29th Nov 2016, 5:38 PM
wave rider
+ 2
you are right about cin. Cout isnt about "final" value, it depends where you write it in. int x=5; int y=6; cout <<x; x+=y; cout<<x; First cout just show the x value(not final value), second Cout show "final" value. (Sorry for my english, i hope im right xd)
24th Nov 2016, 7:44 PM
QZUIO
QZUIO - avatar