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 does c mean in standard form?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What are runtime error?
What is a volatile keyword in c?
What is advantage of pointer in c?
What is a program?
What is dynamic variable in c?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
Are pointers integer?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
How many levels of indirection in pointers can you have in a single declaration?
What is a good way to implement complex numbers in c?
what are the different storage classes in c?
Why c is procedure oriented?
How can I sort more data than will fit in memory?