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
Explain how do you sort filenames in a directory?
Can a function argument have default value?
Write program to remove duplicate in an array?
What functions are used for dynamic memory allocation in c language?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What does 1f stand for?
What is the process to generate random numbers in c programming language?
What the different types of arrays in c?
What is uint8 in c?
How do you do dynamic memory allocation in C applications?
I came across some code that puts a (void) cast before each call to printf. Why?
What are the different types of errors?
How the c program is executed?
What is .obj file in c?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.