Jump to content

SEND + MORE = MONEY: Difference between revisions

SEND + MORE = MONEY in Gambas
(SEND + MORE = MONEY in Gambas)
Line 93:
{{out}}
<pre>Same as FreeBASIC entry.</pre>
 
==={{header|Gambas}}===
{{trans|FreeBASIC}}
<syntaxhighlight lang="gambas">Public Sub Main()
 
Dim m, s, e, n, d, o, r, y As Byte
m = 1
For s = 8 To 9
For e = 0 To 9
If e <> m And e <> s Then
For n = 0 To 9
If n <> m And n <> s And n <> e Then
For d = 0 To 9
If d <> m And d <> s And d <> e And d <> n Then
For o = 0 To 9
If o <> m And o <> s And o <> e And o <> n And o <> d Then
For r = 0 To 9
If r <> m And r <> s And r <> e And r <> n And r <> d And r <> o Then
For y = 0 To 9
If y <> m And y <> s And y <> e And y <> n And y <> d And y <> o Then
If ((1000*(s+m)) + (100*(e+o)) + (10*(n+r)) + (d+e)) = ((10000* m) + (1000*o) + (100*n) + (10*e) + y) Then
Print s & e & n & d & " + " & m & o & r & e & " = " & m & o & n & e & y
End If
End If
Next
End If
Next
End If
Next
End If
Next
End If
Next
End If
Next
Next
 
End</syntaxhighlight>
{{out}}
<pre>Same as FreeBASIC entry.</pre>
 
==={{header|Run BASIC}}===
{{works with|Just BASIC}}
{{works with|Liberty BASIC}}
<syntaxhighlight lang="lb"></syntaxhighlight>
 
==={{header|PureBasic}}===
2,130

edits

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