View Single Post
  #4  
Old 10-02-2022, 10:16
Zeocrack Zeocrack is offline
Friend
 
Join Date: Sep 2022
Location: Bangladesh
Posts: 26
Rept. Given: 2
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 75
Thanks Rcvd at 7 Times in 2 Posts
Zeocrack Reputation: 0
The below C++ code can solve the problem. But need to convert it in simple masm.

#include

int main(void)
{
int a,b,c,d,e,f;
int n;

for (a=2; a<=9; a++)
for (b=2; b<=9; b++)
for (c=2; c<=9; c++)
for (d=2; d<=9; d++)
for (e=2; e<=9; e++)
for (f=2; f<=9; f++)
{
n = 100000*a + 10000*b + 1000*c + 100*d + 10*e +f;
if (a*a*a*a*a*a + b*b*b*b*b*b + c*c*c*c*c*c + d*d*d*d*d*d + e*e*e*e*e*e + f*f*f*f*f*f == n)
{
printf("se! %i\n", n);
return 0;
}
}
}
Reply With Quote