RosettaCodeData/Task/Babbage-problem/Run-BASIC/babbage-problem.basic

7 lines
161 B
Plaintext

for n = 1 to 1000000
if n^2 MOD 1000000 = 269696 then exit for
next
PRINT "The smallest number whose square ends in 269696 is "; n
PRINT "Its square is "; n^2