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

If dog is a friend of boy, is boy a friend of dog?

575


What is general format for a prototype?

599


Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..

3360


. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?

2760


What does iomanip mean in c++?

605






How a macro differs from a template?

637


Is it possible to have a recursive inline function in c++?

557


Can we distribute function templates and class templates in object libraries?

595


Can you write a function similar to printf()?

669


What is a vector c++?

555


We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?

582


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

1007


What is the use of map in c++?

610


Who created c++?

584


Why are pointers not used in c++?

628