Program for Ramanujan Numbers?

what is wrong in the following code 

output:- 1729 4101 4913 {correct output 1729 4104}

#include

int main(){

int i,d=0,j,k,s=5000;

for(i=1;i<=s;i++){

  for(j=1;j

      for(k=1;k

                if((j*j*j)+(k*k*k)==i&&k>j)

       d++;

                   }

}

if(d==2)

        printf("%d\n",i);

  d=0;

  }

}

Replies

You are reading an archived discussion.

Related Posts

So this year Accenture is coming to my college campus and they put criteria of 6.82 CGPA (aggregate) but the problem is I was YD in first year. So my...
i am doing my final year project on ultrasonic cleaning.It uses ultrasonic waves to clean up fruits metals clothes etc.The material to be cleaned is placed under water along with...
In this journal paper they mix the aluminium with natural fibre my question is - How the natural fibre withstand the heat while fabricate?NEW NATURAL FIBRE REINFORCED ALUMINIUM COMPOSITE FOR...
I want to know what things should I keep in my mind while selecting the sites for the test 
Hello sir/mam Now I am doing my UG in CSE and I am well interested in doing astronomy in as my PG and I have some knowledge about space and...