Go Back   Exetools > General > Source Code


Thread Tools Display Modes
Old 02-24-2024, 01:49
chants chants is online now
Join Date: Jul 2016
Posts: 774
Rept. Given: 42
Rept. Rcvd 50 Times in 31 Posts
Thanks Given: 691
Thanks Rcvd at 1,090 Times in 498 Posts
chants Reputation: 50
Originally Posted by Zeocrack View Post
The below C++ code can solve the problem. But need to convert it in simple masm.


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;
your Loop ranges here on the inner loops should start from 0 not 2. Except for the very first iteration, would likely need while loops
Reply With Quote
The Following User Says Thank You to chants For This Useful Post:
Zeocrack (02-24-2024)
Old 02-24-2024, 04:09
0x1F 0x1F is offline
Join Date: Jan 2024
Posts: 2
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 1
Thanks Rcvd at 0 Times in 0 Posts
0x1F Reputation: 0
Originally Posted by Zeocrack View Post
The above code is not going to work.
Of course, it is not going to work, it has to be modified
Reply With Quote

source co

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

All times are GMT +8. The time now is 15:06.

Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )