+ 1
I am faceing a problem with printing hello and world on two diffrent lines!! What shoupd i do now?
4 Respuestas
+ 5
cout<<"Hello"<<endl<<"world"; there are other methods too
+ 2
You can use '\n' or endle to break lines.
These are known as escape sequence in C.
Escape sequences are used in the programming languages C and C++, and also in many more languages (with some variations) like Java and C#. An escape sequence is a sequence of characters that does not represent itself when used inside a character or string literal, but is translated into another character or a sequence of characters that may be difficult or impossible to represent directly.
\n - Gives vertical tab (It moves you to the next line).
+ 2
C: printf("hello \n world");
C++: cout<<"hello \n world";. or cout<<"hello"<<endl<<"world";
+ 1
Yeah!
Thanxx guyss