RosettaCodeData/Task/Babbage-problem/REXX/babbage-problem-2.rexx
2023-07-01 13:44:08 -04:00

6 lines
531 B
Rexx

/*REXX program finds the lowest (positive) integer whose square ends in 269,696. */
do j=2 by 2 /*start J at two, increment by two. */
if ((j * j) // 1000000) == 269696 then leave /*is square mod one million our target?*/
end /*◄── signifies the end of the DO loop.*/
/* [↑] // is division remainder.*/
say "The smallest integer whose square ends in 269,696 is: " j