-- Demonstrates simple IO with integers using For and While Loops -- and a simple if statement. with ada.text_io; use ada.text_io; with ada.integer_text_io; use ada.integer_text_io; procedure io_3_and_4 is count : Natural; i, j : Integer; begin -- Read number of following values to input -- Then read and print that many values get (count); for n in 1 .. count loop get (j); put (j); end loop; new_line; -- Repeatedly reads numbers until a 0 is entered -- Each number is printed, along with whether the number is even or odd get (i); -- First value while i > 0 loop put (i); if i mod 2 = 0 then put_line (" is even"); else put_line (" is odd"); end if; get (i); -- Next value end loop; put_line("Done"); end io_3_and_4;