program to print this triangle
*
* *
* * *
Answer Posted / saravana kumar
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 ? | 7 Yes | 13 No |
Post New Answer View All Answers
Does c++ support exception handling?
What are put and get pointers?
How does java differ from c and c++?
What is double in c++?
How can we access protected and private members of a class?
What is auto type c++?
How can a struct in c++ differs from a struct in c?
Explain what happens when a pointer is deleted twice?
Explain queue. How it can be implemented?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
How long it will take to learn c++?
Will a recursive function without an end condition every quit, in practice a) Compiler-Specific (Some can convert to an infinite loop) b) No c) Yes
Explain class invariant.
Can recursive program be written in C++?
What are manipulators in c++ with example?