Jump to content

Lah numbers: Difference between revisions

m
No edit summary
Line 485:
 
displayLah :: (Int, Int) -> IO ()
displayLah (n, k) = do
when (k == 0) (printf "%3d" n)
printf "%11d" (lah n k)
Line 496:
printf "\n"
mapM_ displayLah [(n, k) | n <- [0..12], k <- [0..12]]
printf "\nMaximum value from the L(100, *) row:\n%d\n"
(maximum $ fmap (lah 100) <$> ([0..100] :: [Integer]))</lang>
{{out}}
<pre>Unsigned Lah numbers: L(n, k):
Line 517:
Maximum value from the L(100, *) row:
44519005448993144810881324947684737529186447692709328597242209638906324913313742508392928375354932241404408343800007105650554669129521241784320000000000000000000000</pre>
 
=={{header|J}}==
<lang J>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.