#include<stdio.h> int main() { /*freopen("input.txt","w",stdout);*/ int a,b,c,d,e,f,g,h,i,j; for(a=6;a<=200;a++) { for(b=2;b<=200;b++) { for(c=b+1;c<=200;c++) { for(d=c+1;d<=200;d++) { if((a>b&&a>c&&a>d)&&(c<d)&&(b<c)) { i=b*b*b+c*c*c+d*d*d; j=a*a*a; if(i==j)printf("Cube = %d, Triple = (%d,%d,%d)\n",a,b,c,d); } } } } } return 0; }
No comments:
Post a Comment