###### tags: `code`
# c14086028-homework-7-1
```cpp=
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define N 4
int main() {
int A[N] = { 50,10,5,1 };
int j = 0;
for (int a = 0; a < 2; a++) {
for (int b = 0; b < 7; b++) {
for (int c = 0; c < 14; c++) {
for (int d = 0; d < 66; d++) {
if (a * A[0] + b * A[1] + c * A[2] + d * A[3] == 65) {
printf("the ( %d,%d,%d,%d ) is solution of integer of 50x+10y+5z+1w=65\n", a, b, c, d);
j++;
}
}
}
}
}
if(j!=0){
printf("the 50x+10y+5z+1w have %d solutions\n",j);
}
else {
printf("the 50x+10y+5z+1w don't have any solution");
}
system("pause");
return 0;
}
```