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 sizeof in c?
What is the return type of sizeof?
What are the c keywords?
Differentiate between the expression “++a” and “a++”?
Are the outer parentheses in return statements really optional?
Should I learn c before c++?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
Why is c fast?
swap 2 numbers without using third variable?
What is the difference between procedural and functional programming?
How can I get back to the interactive keyboard if stdin is redirected?
Explain how are 16- and 32-bit numbers stored?
What are the different categories of functions in c?
How to Throw some light on the splay trees?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................