what is the code for getting the output as
*
**
***
Answer Posted / gg
#include<stdio.h>
main()
{
int n,i=0,j=0;
printf("Enter an intger : ");//upto n nof *'s
scanf("%d",&n);
while(j<n)
{
for(i=0;i<=j;printf("*"),i++);
printf("\n",j++);
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain two-dimensional array.
How can you access memory located at a certain address?
What is property type c?
Explain about C function prototype?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
can anyone suggest some site name..where i can get some good data structure puzzles???
What is the purpose of clrscr () printf () and getch ()?
I just typed in this program, and it is acting strangely. Can you see anything wrong with it?
Explain what is the benefit of using enum to declare a constant?
What is structure data type in c?
Do you know the use of 'auto' keyword?
Can a function argument have default value?
What is the difference between variable declaration and variable definition in c?
Describe the difference between = and == symbols in c programming?
Distinguish between actual and formal arguments.