The following procedure turns self-knowledge
#include <iostream>
#include <stdio.h>
using namespace std;
int main ()
{for
(int base =; Base <= base++) {//number to 9, so the smallest is 10 binary
int number[8] = {1, 3, 5, 7, 9, base + 1, base + 3, base + 5};
for (int i = 0; i < 8; i++) for
(int j = i; J < 8; J +) for
(int k = j; k < 8; k++)
if (number[i) + Numbe R[J] + number[k] = = Base * 3)
printf ("%4d%2d +%2d +%2d = 30\n", base, 2*i+1, 2*j+1, 2*k+1);
return 0;
}
Results:
11 in 1 + 15 + 15 = 30 11 in 3 + 13 + 15 = 30 11 in 5 + 11 + 15 = 30 11 in 5 + 13 + 1 3 = 30 11 in 7 + 11 + 13 = 30 11 in 9 + 11 + 11 = 30 13 in 3 + 15 + 15 = 30 13 in 5 + 13 + 15 = 30 13 in 7 + 11 + 15 = 30 13 in 7 + 13 + 13 = 30 13 in 9 + 11 + 13 = 30 15 in 5 + 15 + 15 = 30 15 in 7 + 13 + 15 = 30 1 5 in 9 + 11 + 15 = 30 15 in 9 + 13 + 13 = 30 17 in 7 + 15 + 15 = 30 17 in 9 + 13 + 15 = 30 19 in 9 + 15 + 15 = Process returned 0 (0x0) execution time:3.131 s Press any key to continue.