RosettaCodeData/Task/Babbage-problem/M2000-Interpreter/babbage-problem.m2000
2023-07-01 13:44:08 -04:00

6 lines
199 B
Text

Def Long k=1000000, T=269696, n
n=Sqrt(269696)
For n=n to k {
If n^2 mod k = T Then Exit
}
Report format$("The smallest number whose square ends in {0} is {1}, Its square is {2}", T, n, n**2)