Question #49518

how to draw a pyramid and its revered by using the function in C program
1

Expert's answer

2015-01-19T03:54:40-0500

Answer on Question #49518 - Engineering, Other

how to draw a pyramid and its revered by using the function in C program

Solution.

#include <stdio.h>
#include <conio.h>
void main()
{
int i, n, j;
printf("\nPlease Give The Value of N: ");
scanf("%d",&n);
for(i=n; i>0; i--)
{
for(j=n-i; j>0; j--)
{
printf(" ");
}
for(j=2*i-1; j>0; j--)
{
printf(" *");
}
printf("\n");
}
getch();
}

</conio.h></stdio.h>

https://www.assignmentsexpert.com/


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS