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
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
what is oops and list its features in c++?
What do you know about near, far and huge pointer?
What data encapsulation is in c++?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
What are the benefits of operator overloading?
When you overload member functions, in what ways must they differ?
How can virtual functions in c++ be implemented?
What is object in c++ example?
What is a constructor in c++ with example?
How to defines the function in c++?
Explain terminate() and unexpected() function?
What is enum class in c++?
What is a linked list in c++?
What is the full form of stl in c++?