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
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Explain null pointer.
explain what is an endless loop?
Write a code to generate a series where the next element is the sum of last k terms.
Write a program to find factorial of a number using recursive function.
Subtract Two Number Without Using Subtraction Operator
Explain what is a const pointer?
Do you know pointer in c?
what is the different bitween abap and abap-hr?
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What are identifiers in c?
Why is c so important?
Why main is used in c?
Explain void pointer?
How are Structure passing and returning implemented by the complier?