zettacode.files/arithmetic.integer/modula-3.txt in zettacode-0.1.0 vs zettacode.files/arithmetic.integer/modula-3.txt in zettacode-0.1.1

- old
+ new

@@ -1,15 +1,15 @@ -MODULE A EXPORTS M +MODULE Arith EXPORTS Main; -IMPORT IO, F +IMPORT IO, Fmt; -VAR , b: INTEGER +VAR a, b: INTEGER; BEGIN - := IO.GI() - b := IO.GI() - IO.Pu("+b = " F.I( + b) "\") - IO.Pu("-b = " F.I( - b) "\") - IO.Pu("*b = " F.I( * b) "\") - IO.Pu(" DIV b = " F.I( DIV b) "\") - IO.Pu(" MOD b = " F.I( MOD b) "\") -END A. + a := IO.GetInt(); + b := IO.GetInt(); + IO.Put("a+b = " & Fmt.Int(a + b) & "\n"); + IO.Put("a-b = " & Fmt.Int(a - b) & "\n"); + IO.Put("a*b = " & Fmt.Int(a * b) & "\n"); + IO.Put("a DIV b = " & Fmt.Int(a DIV b) & "\n"); + IO.Put("a MOD b = " & Fmt.Int(a MOD b) & "\n"); +END Arith.