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
What is a program flowchart and explain how does it help in writing a program?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.
What are the different properties of variable number of arguments?
Explain how do you override a defined macro?
Explain how do you determine a file’s attributes?
What does the c preprocessor do?
What is nested structure with example?
How to create struct variables?
What is the mean of function?
What is #define used for in c?
What is the purpose of void in c?
Which function in C can be used to append a string to another string?
How can I avoid the abort, retry, fail messages?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
Why main is used in c?