what is the code for getting the output as
*
**
***
Answer Posted / babitha
# include <Stdio.h>
# include <conio.h>
# include <string.h>
void main()
{
int j,i,n;
scanf("%d",&n);
for (i=0;i<=n;i++)
{
for(j=0;j<i;j++)
printf("*");
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
What is the advantage of c?
how can f be used for both float and double arguments in printf? Are not they different types?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
Why is structure padding done in c?
can any one tel me wt is the question pattern for NIC exam
What is function and its example?
Write the Program to reverse a string using pointers.
Are pointers really faster than arrays?
What is the difference between exit() and _exit() function in c?
What is c preprocessor mean?
What is pointer and structure in c?
Explain what is the best way to comment out a section of code that contains comments?
Explain what is the concatenation operator?
What is the difference between ++a and a++?