星星

2017-02-15  本文已影响0人  萌面大叔2

include<stdio.h>

int main()
{
int row;
for(row=1;row<=4;row++)
{
int space=1;
for(space=1;space<=4-row;space++)
{
printf(" ");
}
int star=1;
for(star=1;star<=2row-1;star++)
{
printf("
");
}
printf("\n");
}
for(row=5;row<=7;row++)
{
int space=1;
for(space=1;space<=row-4;space++)
{
printf(" ");
}
int star=1;
for(star=1;star<=15-2row;star++)
{
printf("
");

   }
 printf("\n");    
}

printf("\n");
return 0;
}

上一篇 下一篇

猜你喜欢

热点阅读