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
Can member data be public?
Which software is used for c++ programming?
Explain the concept of dynamic allocation of memory?
What is an operator in c++?
What are abstract data types in c++?
What do you mean by late binding?
What is else if syntax?
What is meaning of in c++?
Why is c++ is better than c?
What type of question are asked in GE code writing test based on c++ data structures and pointers?
Write syntax to define friend functions in C++.
What operator is used to access a struct through a pointer a) >> b) -> c) *
Can we delete this pointer in c++?
Define the operators that can be used with a pointer.
What is null pointer and void pointer and what is their use?