Here's my Prog...i dunno how 2 convert it...pls check..
its a pyramid...
#
#include<stdio.h>
main()
{ int a, b, c, d=0;
clrscr();
printf("Enter a No:");
scanf("%d",&c);
for(a=1;a<=c;a++)
{ for(b=1;b<=c*2-1;b++)
if (b<=c+d&&b>=c-d)
printf("*");
else
printf(" ");
printf("\n");
d++;
}
getch();
}
is my program correct?
the output must be..a pyramid