Q:

C++ program to demonstrate example of endl manipulator

belongs to collection: C++ Manipulators programs

0

C++ program to demonstrate example of endl manipulator

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

endl manipulator program in C++

/*C++ program to demonstrate example of endl manipulator.*/
 
#include <iostream>
#include <iomanip>
using namespace std;
 
int main()
{
    cout << "This is line 1." << endl;
    cout << "This is line 2." << endl;
    cout << "This is line 3." << endl;
    cout << "Word1" << endl << "Word2" << endl << "Word3" << endl;
 
    return 0;
}
    This is line 1.
    This is line 2.
    This is line 3.
    Word1
    Word2
    Word3

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ program to demonstrate example of setw manipul... >>