pec-0.2.3: test_cases/euler/Euler6.pec
module Euler6
imports
Prelude
where
main :: () -> I32
main () = do
x = new (0 :: W32)
y = new 0
times 101
(\i -> do
x += i
y += (i * i)
)
t = (@x * @x) - @y
assert (t == 25164150)
putW t
0