how to print this pyramid *
*
*
* * * * * * *
*
*
*
Answer Posted / j.n.abhishek
void main()
{
int n,i,j;
clrscr();
printf("ENTER THE LIMIT:");
scanf("%d",&n);
for(i=0;i<=(2*n);i++)
{
if(i!=n)
{
for(j=0;j<(2*n);j++)
{
printf(" ");
}
printf("+\n");
}
else
{
for(j=0;j<=(2*n);j++)
{
printf("+ ");
}
printf("\n");
}
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
simple program of graphics and their output display
What does sizeof function do?
Why is c called a structured programming language?
What are global variables and explain how do you declare them?
What is difference between scanf and gets?
Why c is procedure oriented?
Explain the concept and use of type void.
How variables are declared in c?
How can you tell whether two strings are the same?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
What are the features of the c language?
Add Two Numbers Without Using the Addition Operator
What is context in c?
What does *p++ do?
Where is volatile variable stored?