第1个回答 2014-04-16
#include <stdio.h>
int main() {
int n1, n2, n5;
for (n1 = 5; n1 <= 65; n1++)
for (n2 = 5; n2 <= 35; n2++)
for (n5 = 5; n5 <= 17; n5++)
if (n1 + n2 * 2 + n5 * 5 == 100)
printf("%3d + %3d * 2 + %3d * 5 = 100\n", n1, n2, n5);
return 0;
}