program to print this triangle
*
* *
* * *
Answer Posted / dhruv kaushal
//Made by- Dhruv Kaushal visit bestindiasongs.blogspot.com
//Programe starts from Next line
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,k,l;
for(i=1;i<=4;i++)
{
cout<<"\n";
for(j=4;j>=i;j--)
{
cout<<" ";
}
for(k=1;k<=i;k++)
{
cout<<"*";
}
for(l=2;l<=i;l++)
{
cout<<"*";
}
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
How can we read/write Structures from/to data files?
Differentiate between a copy constructor and an overloaded assignment operator.
What is a character in c++?
What is virtual base class uses?
Describe the process of creation and destruction of a derived class object?
What are c++ storage classes?
what are the events occur in intr activated on interrupt vector table
Explain binary search.
What size is allocated to the union variable?
What is the use of volatile variable?
What is an incomplete type in c++?
In c++, what is the difference between method overloading and method overriding?
What is the best way to take screenshots of a window with c++ in windows?
What is the purpose of the "delete" operator?
What does new return if there is insufficient memory to make your new object?