作了一点修改:#include main(){int i;float num;printf("输入10个数:");i=10; //加了分号while(i!=0){scanf("%f",&num);if (num>0)printf ("%f,",num); //注意中间的标点i=i-1;}}