program to print this triangle
*
* *
* * *

Answer Posted / saravana kumar

void main()
{
int i , j , k ;
for(i = 0 ; i < 3 ; i++)
{
for (k = 2 ; k >= i ; k--)
{
printf (" ") ;
}
for(j = 0 ; j<= i ; j++)
{
printf ("* " , i , j) ;
}
printf ("\n") ;
}

Is This Answer Correct ?    7 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the advantage of an external iterator.

614


What is else syntax in c++?

637


Is c++ a good beginners programming language?

581


Is c++ a float?

602


Is java a c++?

558






What is the arrow operator in c++?

556


What is the most useful programming language?

602


Const char *p , char const *p What is the difference between the above two?

656


What are the rules about using an underscore in a c++ identifier?

632


Explain how we implement exception handling in c++?

573


an integer constant must have atleast one a) character b) digit c) decimal point

554


Is turbo c++ free?

617


What is private public protected in c++?

547


What is c++ mutable?

700


Can we declare a base-class destructor as virtual?

582