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 malloc and calloc?
What are the different properties of variable number of arguments?
In C language what is a 'dangling pointer'?
What is a stream in c programming?
What are 'near' and 'far' pointers?
What is void main ()?
Explain a pre-processor and its advantages.
Is main is a keyword in c?
given post order,in order construct the corresponding binary tree
What Is The Difference Between Null And Void Pointer?
Write the test cases for checking a variable having value in range -10.0 to +10.0?
What are derived data types in c?
What does struct node * mean?
What is a file descriptor in c?
Does c have circular shift operators?