哪里错了,执行不了
#include<stdio.h>void RMB_numbers(){
int i=0,j=0,pieces,result;
float value,flag,mianzhi={100,50,10,5,2,1,0.5,0.1,0.05,0.01};
printf("Please input the value:\t");
scanf("%f",&value);
while(value>=mianzhi,i<10)
{
pieces=value/mianzhi;
value=value-pieces*mianzhi;
i++;
}
for(i=0;i<10;i++)
{
if(pieces)
{
result=pieces;
flag=mianzhi;
j++;
}
}
for(i=0;i<j;i++)
{
printf("面值为\t%4.2f¥的:\t%d张\n",flag,result);
}}void main()
{
printf("\tThis is theRMB_numbers program\n");
RMB_numbers();
} while(value>=mianzhi,i<10); floatvalue,mianzhi={100,50,10,5,2,1,0.5,0.1,0.05,0.01};
value>=mianzhi;mianzhi是一个flat数组,这样不能比较的。value是一个float数
页:
[1]