How to print two results with some messages in single cout instruction | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to print two results with some messages in single cout instruction

29th Jun 2017, 11:07 PM
Githesh
Githesh - avatar
2 Answers
+ 14
C++ syntax: cout<<"First number: "<<a<<" and second number: "<<b<<endl; // endl prints new line
29th Jun 2017, 11:13 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 4
tnx
29th Jun 2017, 11:15 PM
Githesh
Githesh - avatar