count也不能得到正确结果
求100可以由1.,2,5组成时有多少种组合
#include<iostream.h>
void main()
{
int i,j,k;
int a=5,b=2,c=1;
int sum=0,count=0;
for(i=1;i<=100;i++)
{
c=c*i;
cout<<"c value:";
cout<<c<<endl;
for(j=1;j<=50;j++)
{
b=b*j;
cout<<"b value:";
cout<<b<<endl;
for(k=1;k<=20;k++)
{ a=a*k;
cout<<"k value:"<<k<<endl;
sum+=(a+b+c);
cout<<"sum value:";
cout<<sum<<endl;
if(sum==100)
++count;
cout<<"count valude:"<<count<<" ";
}
}
}
}