主题:空心菱形还有一半打不出来求助
我只能打印出一半,还有一半出不来,找不到打印另一半的条件
#include <stdio.h>
void main()
{
int i = 0, j = 0 , k = 0;
for (i = 1;i <= 5; i++)
{
for ( k = 5;k>=i;k--)
{
printf(" ");
}
for (j =1 ;j <2*i;j++ )
{
if (j == k )
printf("*");
}
printf("\n");
}
for (i = 5; i>1; i--)
{
for ( k = 5;k>=i;k--)
{
printf(" ");
}
for (j =1 ;j <2*i;j++ )
{
if (j == k)
printf("*");
}
printf("\n");
}
}[em1][em1][em1][em1][em1][em1][em1][em44][em1][code=c]
for if printf main[/code]
#include <stdio.h>
void main()
{
int i = 0, j = 0 , k = 0;
for (i = 1;i <= 5; i++)
{
for ( k = 5;k>=i;k--)
{
printf(" ");
}
for (j =1 ;j <2*i;j++ )
{
if (j == k )
printf("*");
}
printf("\n");
}
for (i = 5; i>1; i--)
{
for ( k = 5;k>=i;k--)
{
printf(" ");
}
for (j =1 ;j <2*i;j++ )
{
if (j == k)
printf("*");
}
printf("\n");
}
}[em1][em1][em1][em1][em1][em1][em1][em44][em1][code=c]
for if printf main[/code]