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
What is abstraction c++?
Why is c++ called oops?
What is the latest version on c++?
What are the 3 levels of programming languages?
What is the role of C++ shorthand's?
Why we use #include conio h in c++?
write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num
What is the size of a vector?
What is protected inheritance?
What is the main purpose of c++?
Why is it necessary to use a reference in the argument to the copy constructor?
What is insertion sorting?
What is the difference between the indirection operator and the address of oper-ator?
Which programming language is best to learn first?
What is data structure in c++?