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
Is set c++?
Explain public, protected, private in c++?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Which operator cannot be overloaded c++?
What does return 0 do in c++?
Is ca high or low level language?
What is c++ similar to?
What is the difference between passing by reference and passing a reference?
How do you compile the source code with your compiler?
What are c++ files?
What is a try block?
Explain the difference between c++ and java.
Can create new c++ operators?
What are structures and unions?
What are the classes in c++?