Write a program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
Don't use printf statements;use two nested loops instead.
you will have to use braces around the body of the outer
loop if it contains multiple statements.
Answer Posted / dhanashree n.gavade
int i,j,m;
m=2;
for(i=0;i<5,i++)
{
putch('*');
putch('\n');
for(j=i;j<=j+m;j++)
putch('*');
m=j;
putch('\n');
}
| Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
Explain what is wrong in this statement?
all c language question
What is enumerated data type in c?
What is printf () in c?
What are the 4 types of organizational structures?
What is typedef?
What is the concatenation operator?
what will be maximum number of comparisons when number of elements are given?
Explain how can you determine the size of an allocated portion of memory?
What does main () mean in c?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
How does sizeof know array size?
Can you please explain the difference between strcpy() and memcpy() function?
What are disadvantages of C language.
What are the 32 keywords in c?