RosettaCodeData/Task/Metallic-ratios/Zkl/metallic-ratios-2.zkl
2023-07-01 13:44:08 -04:00

7 lines
400 B
Text

metals:="Platinum Golden Silver Bronze Copper Nickel Aluminum Iron Tin Lead";
foreach metal in (metals.split(" ")){ n:=__metalWalker.idx;
println("\nLucas sequence for %s ratio; where b = %d:".fmt(metal,n));
println("First 15 elements: ",lucasSeq(n).walk(15).concat(" "));
mr,i := metallicRatio(lucasSeq(n));
println("Approximated value: %s - Reached after ~%d iterations.".fmt(mr,i));
}