Question: Run the following Ada sample code. Refer to the sample code below. Write an Ada code that read ten integers from stdin, and find the
With Ada. Text IO; Use Ada. Text IO; With Ada. Integer_Text 10; Use Ada. Integer Text 1o; procedure Arrl is A: array(1..5) of Integer; Array suscripts 1 to 5, I: Integer; sum: integer; begin sum :=0; Read 'em in. for I in 1..5 loop Put(" ") Get(A(I)); end loop; Put 'em out in reverse order. Put ("); for I in reverse A'Range loop Put (A(I)); sum := sum + A(1); if I > A'First then Put(..); end if; end loop Put_Line("); Put( sum); end Arrl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
