Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
20
Task/Arithmetic-Integer/Ada/arithmetic-integer.adb
Normal file
20
Task/Arithmetic-Integer/Ada/arithmetic-integer.adb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue