Sha256: 36df876a4fc33fc1625719546c01b9c1976a72f0e56e2a4d5ddafccfc9b33a5e
Contents?: true
Size: 609 Bytes
Versions: 10
Compression:
Stored size: 609 Bytes
Contents
with Ada.Text_Io; with Ada.Integer_Text_IO; procedure Integer_Arithmetic is use Ada.Text_IO; use Ada.Integer_Text_Io; A, B : Integer; begin Get(A); Get(B); Put_Line("a+b = " & Integer'Image(A + B)); Put_Line("a-b = " & Integer'Image(A - B)); Put_Line("a*b = " & Integer'Image(A * B)); Put_Line("a/b = " & Integer'Image(A / B)); Put_Line("a mod b = " & Integer'Image(A mod B)); -- Sign matches B Put_Line("remainder of a/b = " & Integer'Image(A rem B)); -- Sign matches A Put_Line("a**b = " & Integer'Image(A ** B)); end Integer_Arithmetic;
Version data entries
10 entries across 7 versions & 1 rubygems