Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.
Answer Posted / manoj
void main() {
int n = 5 ; // take use input here
int i, j;
for( i =1; i<=n; i++){
printf("\n *");
for(j=1; j<i; j++){
printf(" *");
}
}
}
| Is This Answer Correct ? | 8 Yes | 13 No |
Post New Answer View All Answers
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
What is operator precedence?
What are the modifiers available in c programming language?
What is assert and when would I use it?
What are Macros? What are its advantages and disadvantages?
What is structure padding and packing in c?
Without Computer networks, Computers will be half the use. Comment.
What does do in c?
What is the use of ?: Operator?
What is the purpose of main() function?
What is a file descriptor in c?
All technical questions
What are different types of operators?
what is the diffrenet bettwen HTTP and internet protocol
difference between object file and executable file