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
If dog is a friend of boy, is boy a friend of dog?
What is general format for a prototype?
Write a program using GUI concept for the scheduling algorithms in Operating system like SJF,FCFS etc..
. 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?
What does iomanip mean in c++?
How a macro differs from a template?
Is it possible to have a recursive inline function in c++?
Can we distribute function templates and class templates in object libraries?
Can you write a function similar to printf()?
What is a vector c++?
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?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
What is the use of map in c++?
Who created c++?
Why are pointers not used in c++?