* *
* *
* *
*
Soluation:-
/*c pyramid program for v-symbol*/
#include<stdio.h>
int main()
{
int num=4,r,c,sp;
for(r=1,c=num+1; r<=num; r++,c=c-2)
{
for(sp=r; sp>1; sp--)
printf(" ");
printf("*");
for(sp=c; sp>=1; sp--)
printf(" ");
if(c>=1)
printf("*");
printf("\n");
}
getch();
return 0;
}
0 comments:
Post a Comment