codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  What`s wrong with this code?  ehump20 at 15:49 on Sunday, February 11, 2007
 

int main()
{
for ( int A = 1; A <= 75; ++A)
{
for( int B = A; B <=75; ++B)
{
for( int C = B; C <=75; ++C)
{
for( int D = C; D <=75; ++D)
{
for( int E = D; E <=75; ++E)
{
for( int F = E; F <=75; ++F)
{
if ((A^5) + (B^5) + (C^5) +(D^5) + (E^5))== (F^5))
{
cout << "A = " << A << "B = " << B << "C = " << C << "D = " << D << "E = " << E << "F = " << F << endl;
}
}
}
}
}
}
}
}


This code is supposed to find the solution where (A^5) + (B^5) + (C^5) +(D^5) + (E^5)) = (F^5), and 0 < A <= B <= C <= D <= E <= F <= 75. Also, is there anyway to make it faster?








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem
•  Re: import contacts of msn/yahoo
•  Cookies and Threads C++
•  right justify a background in a table?
•  Help with Loop (C++/MFC)
•  Help with Loop (C++/MFC)


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007