CODE
#include <iostream>
using namespace std;
void main()
{
int i, j, k, l; // Counter variables
//-------------------- description object -----------------------------------
// Tell user what program does
cout << "The following numbers indicate valid solutions to the lazy hobo\n";
cout << "riddle.\n" << endl;
//-------------------- end description object -------------------------------
//-------------------- computation object -----------------------------------
// Determine valid solutions to i*i + j*j + k*k + l*l = 200
for (i=1; i<=14; i++) {
for (j=1; j<=14; j++) {
for (k=1; k<=14; k++) {
for (l=1; l<=14; l++) {
if (i*i + j*j + k*k + l*l == 200) {
// Output valid number sequence
cout << i << " " << j << " " << k << " " << l << endl;
}
}
}
}
}
//-------------------- end computation object -------------------------------
} //end main