+ 2
Is it that right
cin is used to take the information from the user . cout is used to show the final value
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
+ 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)