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
What is a block in c++?
Is it possible for a member function to delete the pointer, named this?
Write a program to find the reverse Fibonacci series starting from N.
What are arrays c++?
Is there any difference between int [] a and int a [] in c++?
What is a stack c++?
What is vector string in c++?
Which one is better- macro or function?
What is the best c++ compiler?
What is meant by the term name mangling in c++?
Differentiate between a copy constructor and an overloaded assignment operator.
How do I write a c++ program?
What is rvalue?
What does n mean in c++?
Should the member functions which are made public in the base class be hidden?