RosettaCodeData/Task/A+B/Modula-3/a+b.mod3

17 lines
241 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
MODULE Ab EXPORTS Main;
IMPORT IO;
VAR
A,B:INTEGER;
BEGIN
TRY
A := IO.GetInt();
B := IO.GetInt();
EXCEPT
| IO.Error => IO.Put("Invalid number!\n");
END;
IO.PutInt(A+B);
IO.Put("\n");
END Ab.