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
Explain the difference between c & c++?
What are formatting flags in ios class?
What are the advantages of prototyping?
What is a friend function in c++?
What will happen if a pointer is deleted twice?
Explain function overloading and operator overloading.
How we can differentiate between a pre and post increment operators during overloading?
How do you flush std cout?
what is scupper?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What character terminates all character array strings a) b) . c) END
what are function pointers?
Which programming language's unsatisfactory performance led to the discovery of c++?
What is flush c++?
Evaluate !(1&&1||1&&0) a) Error b) False c) True