Home » » The Escape Sequences in C++ - Example program

The Escape Sequences in C++ - Example program

The Escape Sequences in C++ - Example program
Write a C++ program to print "I Love Pakistan" on screen using single cout statement with the help of escape sequences.

 
output must loot like as under: 
I
LOVE
PAKISTAN
See below, it is solution of above program
In this program escape sequence "\n" is used. It is used t transfer the printing control to the next statement. 
CODE:
#include<iostream.h>
#include<conio.h>
main(){
clrscr();
cout<<"I\nLOVE\nPAKISTAN";
}

See more EXAMPLES

Thanks for visiting The Escape Sequences in C++ - Example program

Download
more from: CS Adventures

0 comments:

Post a Comment

LIKE US

Popular Posts

My FANS around the WORLD

Flag Counter