//用while 实现菱形的输出
#include<stdio.h>
void main()
{
int i,j,k;
int m,n,f;
i=1;
while(i<10)
{ j=1;
while(j<11-i)
{
printf(" ");
j++;
}
k=1;
while(k<=2*i-1)
{
printf("*");
k++;
}
i++;
printf("\n");
}
f=1;
while(f<10)
{ m=1;
while(m<=f)
{
printf(" ");
m++;
}
n=1;
while(n<=19-2*f)
{
printf("*");
n++;
}
f++;
printf("\n");
}
}