Dremendo Tag Line
t

Print text on separate lines in C++

cout - Question 1

In this question, we will see how to print multiple text on separate lines in C++ programming using the cout statement. To know more about cout statement click on the cout statement lesson.

Q1) Write a program in C++ to print the name of 5 countries on separate lines on the screen.

Program

#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
    cout<<"India\n";
    cout<<"Australia\n";
    cout<<"England\n";
    cout<<"United States of America\n";
    cout<<"China";
    return 0;
}

Output

India
Australia
England
United States of America
China
video-poster