Write a Program to print this triangle:
*
**
*
****
*
******
*
********
*
**********
use two nested loops.
Answer Posted / naman patidar
void main() {
int n = 5 ; // take use input here
int i, j;
for( i =1; i<=n; i++){
printf("\n *");
for(j=0; j<=i; j++){
printf(" *");
}
}
}
| Is This Answer Correct ? | 23 Yes | 22 No |
Post New Answer View All Answers
What is difference between main and void main?
What is printf () in c?
Is array name a pointer?
What is return type in c?
What are the parts of c program?
What is file in c preprocessor?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
In C language, a variable name cannot contain?
What is the use of sizeof () in c?
How can I make sure that my program is the only one accessing a file?
Do array subscripts always start with zero?
How do c compilers work?
What is dynamic dispatch in c++?
Why do we use c for the speed of light?
When should you not use a type cast?