Jump to content

24 game: Difference between revisions

333 bytes added ,  1 month ago
Line 5,840:
24 Game
 
May 1316, 2024
 
Rich Love
 
Modified to include 96 blocks of numbers for random selection.
 
Thanks to Ken and Bernie
Line 6,057 ⟶ 6,055:
 
//check expr for validity
 
short j
bool GotAllNumbers : GotAllNumbers = _false
Line 6,062 ⟶ 6,061:
short GotaNumber : GotaNumber = 0
short TotalNumbers : TotalNumbers = 0
 
short ExtraNumbers:ExtraNumbers = 0
 
for i = 1 to len$(fn stringpascalstring(expr))
if asc(mid$(fn stringpascalstring(expr),i,1)) > 48 && asc(mid$(fn stringpascalstring(expr),i,1)) < 58
ExtraNumbers ++
end if
next i
 
if ExtraNumbers > 4
fn EraseErrorText
text ,,fn colorRed
TryAgain = _true
print %(10,200);"Error! Extra numbers not allowed": goto "InputExpression"
text ,,fn colorWhite
end if
 
 
for i = 1 to 4
47

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.