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
Can non graphic characters be used and processed in C++?
Should I learn c++ c?
Does c++ have arraylist?
What is the basic concept of c++?
What does extern mean in a function declaration in c++?
Which software is best for coding?
What is else syntax in c++?
Is c++ a good first language to learn?
Is c++ slower than c?
Who calls main function?
Does c++ have foreach?
What are the various compound assignment operators in c++?
Can a program run without main function?
What's the order in which the local objects are destructed?
Explain the uses oof nested class?