program to print this triangle
*
* *
* * *

Answer Posted / maria

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 ?    33 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a block in c++?

546


Is it possible for a member function to delete the pointer, named this?

608


Write a program to find the reverse Fibonacci series starting from N.

601


What are arrays c++?

602


Is there any difference between int [] a and int a [] in c++?

545






What is a stack c++?

567


What is vector string in c++?

570


Which one is better- macro or function?

646


What is the best c++ compiler?

590


What is meant by the term name mangling in c++?

514


Differentiate between a copy constructor and an overloaded assignment operator.

637


How do I write a c++ program?

590


What is rvalue?

673


What does n mean in c++?

629


Should the member functions which are made public in the base class be hidden?

556