+ 1
What is the cout << "sum is" << sum?
Is that mean ("sum%d", a);? I only learned C... So it's little bit confuse...
4 Réponses
+ 3
It is like Printf<<"sum is"<<%d ,∑
I actually don't remember the syntax. I learned. C. many years ago.
Hope you understand from this.
+ 3
cout << "Sum is " << sum << endl;
==
printf("Sum is %d\n", sum);
+ 1
To complete what has been said: cout is the console output stream object. In C++, to print something in the console, you send stuff to cout.
- 1
it prints sum is : a value according to the expression