ADA Program to find area of square
Program
With Gnat.IO; use Gnat.IO;
procedure areaofsquare is
side : Integer;
area : Integer;
begin
Put ("Enter the dimension of a side: ");
Get (side);
area := side * side;
Put_Line ("Area = " & integer'image(area));
end;
Output
$ gnat make areaofsquare.adb
gcc -c areaofsquare.adb
gnatbind -x areaofsquare.ali
gnatlink areaofsquare.ali
$ ./areaofsquare
Enter the length of one side: 6
Area = 36