打印一个菱形~~~
#include <stdio.h>int main(void)
{
char diamond[5][5]={{' ',' ','*'},{' ','*',' ','*'},
{'*',' ',' ',' ','*'},
{' ','*',' ','*'}, {' ',' ','*'}};
int i, j;
for(i=0;i<5;i++) {
for (j=0;j<5;j++)
printf("%c", diamond[i][j]);
printf("\n");
}
getchar();
}
可以修改指正一下吗?????