Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Babbage-problem/Frink/babbage-problem.frink
Normal file
17
Task/Babbage-problem/Frink/babbage-problem.frink
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// This is a solver for the Rosetta Code problem "Babbage problem"
|
||||
// https://rosettacode.org/wiki/Babbage_problem
|
||||
|
||||
i = 1
|
||||
while true
|
||||
{
|
||||
// mod is the modulus operator.
|
||||
// The == operator is a test for equality. A single =
|
||||
// assigns to a variable.
|
||||
if i² mod million == 269696
|
||||
{
|
||||
// This prints i and i²
|
||||
println[i + "² = " + i²]
|
||||
exit[] // This terminates the program if a solution is found.
|
||||
}
|
||||
i = i + 1
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue