RosettaCodeData/Task/Babbage-problem/ANSI-BASIC/babbage-problem.basic
2026-04-30 12:34:36 -04:00

11 lines
371 B
Text

100 REM Babbage problem
110 REM We can start at the square root of 269696
120 LET I = 520
130 REM 269696 is a multiple of 4, 520 too
140 REM so we can increment I by 4
150 DO WHILE MOD((I * I), 1000000) <> 269696
160 LET I = I + 4
170 LOOP
180 PRINT "The smallest positive integer whose square ends in the digits 269696 is"; I
190 PRINT "Its square is"; I * I
200 END