Show the Reasult of Star Cube............
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,n;
printf("enter n");
scanf("%d",&n);
for(a=1;a<=n;a++)
{
for(b=1;b<=n;b++)
if(a==1)
printf("*");
else if(b==1)
printf("*");
else if(a==n)
printf("*");
else if(b==n)
printf("*");
else
printf(" ");
printf("\n");
}
getch();
}
***************
* * * * * * * * * * * * * * ***************
No comments:
Post a Comment