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 storage qualifiers in c++.
Who discovered c++?
What are enumerations?
Differentiate between C and C++.
What are keywords in c++?
Explain the difference between static and dynamic binding of functions?
Name the operators that cannot be overloaded in C++?
Is python written in c or c++?
What is while loops?
Define token in c++.
What is increment operator in c++?
What is the use of 'this' pointer?
What kind of problems can be solved by a namespace?
Explain the difference between struct and class in terms of access modifier.
Explain deep copy and a shallow copy?