ADA Program to find the sum of two integer number
Program
With Gnat.IO; use Gnat.IO;
procedure addtwointeger is
a : Integer;
b : Integer;
sum : Integer;
begin
Put ("Enter value of a: ");
Get (a);
Put ("Enter value of b: ");
Get (b);
sum := a + b;
Put_Line ("Sum = " & integer'image(sum));
end;
Output
$ gnat make addtwointeger.adb
gcc -c addtwointeger.adb
gnatbind -x addtwointeger.ali
gnatlink addtwointeger.ali
$ ./addtwointeger
Enter value of a: 65
Enter value of b: 14
Sum = 79