12a+8b+5c=180
a+b+c=20
15a+10b+9c=?
#include
#include
int main(int argc,char* agrv[])
{
int a,b,c,sum=0;
for (a=1;a sum) sum=15*a+10*b+9*c;
}
}
printf ("sum=%dn",sum);
exit (0);
}
输出结果:
a=8,b=8,c=4
a=11,b=1,c=8
sum=247
12a+8b+5c=180
a+b+c=20
15a+10b+9c=?
#include
#include
int main(int argc,char* agrv[])
{
int a,b,c,sum=0;
for (a=1;a sum) sum=15*a+10*b+9*c;
}
}
printf ("sum=%dn",sum);
exit (0);
}
输出结果:
a=8,b=8,c=4
a=11,b=1,c=8
sum=247