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
Differentiate between functions getch() and getche().
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
Write a program to swap two numbers without using third variable in c?
What is the difference between pure virtual function and virtual function?
What is pointer to pointer in c with example?
Which is the best website to learn c programming?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What are the ways to a null pointer can use in c programming language?
Why is this loop always executing once?
What are the scope of static variables?
Write a Program to find whether the given number or string is palindrome.
What is the use of ?
What does the c preprocessor do?
When should the const modifier be used?
What is selection sort in c?