C++ Examples

Write a C++ Program to print a welcome text in a separate line.

#include <iostream>
using namespace std;

int main()
{
   // '\n' is used to write in a separate line
   cout<<"Write Welcome text in a separate line\n";
   cout<<"--------------------------------------\n";
   cout<<"Welcome\n";
   
   return 0;
}

Output

Write Welcome text in a separate line
--------------------------------------
Welcome
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments