Topic:
Escape Sequences in C++
Problem:
Write a program to display following output using single cout statement.
*
**
***
****
Solution:
#include<iostream.h>
#include<conio.h>
int main ()
{
cout<<"*\n**\n***\n****";
getch();
}
#include<conio.h>
int main ()
{
cout<<"*\n**\n***\n****";
getch();
}
Output:
Let me know in the comment section if you have any question.
Previous Post:
Program that adds two floating point numbers and shows the sum on screen.
Previous Post:
Program that adds two floating point numbers and shows the sum on screen.
Next Post: