回复 10楼 Susake
如果要把其他z时,x,y输出呢
2013-04-23 23:00
2013-04-23 23:01
2013-04-23 23:04
2013-04-23 23:08
程序代码://19*x+23*y+z=235
#include <stdio.h>
int main() {
int x, y, z, t = 4;
for(x = 0; x < 15; x++)
for(y = 0; y <= 10; y++)
for(z = 0; z <= 235; z++)
if(235 == 19 * x + 23 * y + z) {
if(z < t) {
t = z;
printf("%d %d %d\n", x, y, t);
}
}
return 0;
}

2013-04-23 23:12
2013-04-23 23:26
2013-04-24 00:33