My house's number can be written
as ABCD but it also equals to
A^B * C^D.
Find the number ..-no computer programs!!!
(In reply to
Poor BASIC people... by Federico Kereki)
...who have to use extinct birds for such a little program! In Visual Basic you can use the following:
For A = 0 To 9
For B = 0 To 9
For C = 0 To 9
For D = 0 To 9
If A^B*C^D = A*1000+B*100+C*10+D Then
Text1.Text = Str(A)+Str(B)+Str(C)+Str(D)
End If
Next
Next
Next
Next
That's a whole 2 lines less (as long as I don't declare my variables and include the return statement... ;) )
|
Posted by Erik O.
on 2004-06-21 16:09:34 |