问题出在哪了?
#include <stdio.h>
void main()
{
int f1,f2,f5,m1,m2,m5,a=1;
printf("凑成一块钱的方法有:\n");
for(f1=0;f1<=100;f1++)
for(f2=0;f2<=50;f2++)
for(f5=0;f5<=20;f5++)
for(m1=0;m1<=10;m1++)
for(m2=0;m2<=5;m2++)
for(m5=0;m5<=2;m2++)
{
if(0.01*f1+0.02*f2+0.05*f5+0.1*m1+0.2*m2+0.5*m5==1)
printf("5毛=%d 2毛=%d 1毛=%d 5分=%d 2分=%d 1分=%d",m5,m2,m1,f5,f2,f1);
}
}