RosettaCodeData/Task/Babbage-problem/M2000-Interpreter/babbage-problem.m2000

7 lines
199 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
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)