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
Describe the advantage of an external iterator.
What is else syntax in c++?
Is c++ a good beginners programming language?
Is c++ a float?
Is java a c++?
What is the arrow operator in c++?
What is the most useful programming language?
Const char *p , char const *p What is the difference between the above two?
What are the rules about using an underscore in a c++ identifier?
Explain how we implement exception handling in c++?
an integer constant must have atleast one a) character b) digit c) decimal point
Is turbo c++ free?
What is private public protected in c++?
What is c++ mutable?
Can we declare a base-class destructor as virtual?