program to print this triangle
*
* *
* * *

Answer Posted / mayank murari

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,k;
for(i=1;i<4;i++)
{
for(j=4;j>=i;j--)
{
printf(" ");
}
for(k=1;k<2*i;k++)
{
printf("*");
}
printf("\n");
}

getch();
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the properties and principles of oop.

533


What is the cout in c++?

554


Explain virtual class and friend class.

605


What are built-in functions? What is the syntax for the definition?

570


Should I learn c++ c?

618






What is DlgProc?

604


Which is best ide for c++?

569


What are the advantages of using const reference arguments in a function?

622


Give 10 points of differences between C & C++.

627


What is size_type?

549


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

674


What is null and void pointer?

597


When does a 'this' pointer get created?

624


Who discovered c++?

560


What is virtual table?

625