+ 2

what is the difference between this codes even if they give me the same solution?

#include <iostream> using namespace std; int main() { cout << "This " << "is " << "awesome!"; return 0; } #include <iostream> using namespace std; int main() { cout << "This is awesome!"; return 0; }

19th Aug 2016, 12:10 PM
The Punisher
The Punisher - avatar
1 Antwort
+ 3
There is no difference in output but you call it just sloppy code since one (2) is going to be more work and be harder to read. The use of more "<<" would be for a variable usally such as int x = 5; cout << "x equals " << x << endl; Output: x equals 5 I hope this answers your question if not please tell me
19th Aug 2016, 1:08 PM
Vinpin