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
What is the difference between reference and pointer?
What is input operator in c++?
What is a c++ class?
What is ios flag in c++?
What is operators in c++?
What is data type in c++?
List down the guideline that should be followed while using friend function.
Difference between a homogeneous and a heterogeneous container
Is c++ used anymore?
How many standards of c++ are there?
What is c++ prototype?
Do you know what are static and dynamic type checking?
Can non graphic characters be used and processed in C++?
What do you mean by public protected and private in c++?
Difference between struct and class in terms of access modifier.