program to print this triangle
*
* *
* * *

Answer Posted / rajesh

#include<stdio.h>
main()
{
int i,j;
for(i=1;i<=3;i++)
{
for(j=1;j<=i;j++)
printf(""+"*",i,j);
}
}

Is This Answer Correct ?    8 Yes 58 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an inclusion guard?

624


Explain polymorphism?

586


What is difference between malloc()/free() and new/delete?

651


Can you use the function fprintf() to display the output on the screen?

670


Why do we use setw in c++?

649






Should a constructor be public or private?

541


What is an incomplete type in c++?

771


Is c++ proprietary?

582


When to use “const” reference arguments in a function?

585


Where do I find the current c or c++ standard documents?

585


What is increment operator in c++?

564


What's the best free c++ profiler for windows?

623


Tell me can a pure virtual function have an implementation?

558


What is the need of a destructor?

640


What is isdigit c++?

579