Wed May 27, 2009 12:34 am
include<stdio.h>
int main ()
{
int pow (int x, int y);
int i,j,k;
int sum=0;
int c,d,f;
for(i=1;i<5;i++)
{for(j=1;j<5;j++)
{for(k=1;k<5;k++)
{
c==i^3;
d==j^3;
f==k^3;
}}}
sum=sum+c+d+f;
if(sum=i*100+j*10+k)
{printf("the %d %d %d are numbers having the sum of cubic power of each is %d\n\n\n",i,j,k,sum);
}
return 0;
}
Mon Aug 24, 2009 4:50 pm
Sun Aug 30, 2009 8:25 pm
Thu Nov 04, 2010 4:04 pm
#include <stdio.h>
int main()
{
int i, j, k;
int c, d, e;
int sum = 0;
for (i = 1; i < 10; i++) {
for (j = 1; j < 10; j++) {
for (k = 1; k < 10; k++) {
c = i*i*i;
d = j*j*j;
e = k*k*k;
sum = c + d + e;
if (sum == (i*100 + j*10 + k)) {
printf("%d%d%d = %d^3 + %d^3 + %d^3 = %d + %d + %d\n", i,j,k,i,j,k,c,d,e);
}
}
}
}
return 0;
}
153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27
371 = 3^3 + 7^3 + 1^3 = 27 + 343 + 1
Wed Mar 21, 2012 5:25 pm
|
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.