0
How to add a new line without using \n ?
2 Antworten
+ 4
In java use println funtion
0
"\x0a"
in python:
print("hello word", "\x0a", "hello world", sep='')
or
print()
you can even do:
print("hello word", "\x0a" * 5, "hello world", sep='') # five blank lines
in C++:
cout << "hello world" << '\x0a' << "hello world";
or
cout << endl;
Here's a handy reference you can use: http://www.cplusplus.com/doc/ascii/
The "\x0a" is for the "LF",.... I think it stands for "Line Feed".