Use the \n code to generate a new line. : Escape sequence « Development « C++ Tutorial






#include <iostream> 
using namespace std; 
 
int main() 
{ 
  cout << "one\n"; 
  cout << "two\n"; 
  cout << "three"; 
  cout << "four"; 
 
  return 0; 
}
one
two
threefour"








5.14.Escape sequence
5.14.1.Use the \n code to generate a new line.
5.14.2.Escape sequences: \t
5.14.3.Escape sequences: \b
5.14.4.Escape keys for double back slash