public static void main(String[] args) {
/* 8. (for 循环)*编程找出四位整数a b c d 中满足下述关系的数。(a b+c d)(a b+c d)=a b c d */
int a = 0;
int b = 0;
int c = 0;
int d = 0;
for (a = 0; a <= 9; a++) {
for (b = 0; b <= 9; b++) {
for (c = 0; c <= 9; c++) {
for (d = 0; d <= 9; d++) {
if (((a * 10 + b) + (c * 10 + d) * (a * 10 + b) + (c * 10 + d)) == a * 1000 + b * 100 + c * 10
+ d) {
System.out.println(a + " " + b + " " + c + " " + d + " ");
}
}
}
}
}
}
{
}
}