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
Why do we need a structure?
Can a local variable be volatile in c?
Between macros and functions,which is better to use and why?
Is there anything like an ifdef for typedefs?
All technical questions
What is adt in c programming?
Which header file is used for clrscr?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
List out few of the applications that make use of Multilinked Structures?
What is the purpose of & in scanf?
What is c basic?
how we can make 3d venturing graphics on outer interface
What is the modulus operator?
What are c preprocessors?
Differentiate between full, complete & perfect binary trees.