'@rahimbigbana (beginners).
'i want my mobilephone show me
'how many number between 0 to
'9999 can give sum of 23 and what
'number it is because i want to buy
'this 4 digit number at the Magnum
'lottery counter maybe 1 number
'just for fun.
'The result can found at 4d88.com
'i never buy, bro.
'let start coding on your android...
cls
print color(33)
cnt=0
kol=1
row=1
for a=0 to 9
for b=0 to 9
for c=0 to 9
for d=0 to 9
' i choose single number abcd
' flush aabc abbc abcc aaab...
if a+b+c+d=23 then
if a=b or b=c or c=d or d=a or a=c or a=d or b=d then
goto skip
endif
cnt=cnt+1
print at(row,kol);a;b;c;d
kol=kol+5
if kol=31 then
kol=1
row=row+1
if row=22 then
input a$
cls
row=1
endif
endif
skip:
endif
next d
next c
next b
next a
print "Grand Total: "; cnt
'its work! top secret is broken now!
'Oh my god, 240/10000 how to choose..
'any idea to improve my code, please tell me.
'thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "Programs" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
'@rahimbigbana (beginners).
'i want my mobilephone show me
'how many number between 0 to
'9999 can give sum of 23 and what
'number it is because i want to buy
'this 4 digit number at the Magnum
'lottery counter maybe 1 number
'just for fun.
'The result can found at 4d88.com
'i never buy, bro.
'let start coding on your android...
cls
print color(33)
cnt=0
kol=1
row=1
for a=0 to 9
for b=0 to 9
for c=0 to 9
for d=0 to 9
' i choose single number abcd
' flush aabc abbc abcc aaab...
if a+b+c+d=23 then
if a=b or b=c or c=d or d=a or a=c or a=d or b=d then
goto skip
endif
cnt=cnt+1
print at(row,kol);a;b;c;d
kol=kol+5
if kol=31 then
kol=1
row=row+1
if row=22 then
input a$
cls
row=1
endif
endif
skip:
endif
next d
next c
next b
next a
print "Grand Total: "; cnt
'its work! top secret is broken now!
'Oh my god, 240/10000 how to choose..
'any idea to improve my code, please tell me.
'thanks.
I don't do very pretty output, but here's my take. There are ten unique solutions, each with FACT(4) ways to arrange them.