-- Read 4 characters
with ada.text_io; use ada.text_io;
procedure inp2 is
c: Character;
begin
-- READ and PRINT a character 4 times
get(c); -- Reads next character in input, and store that value in c
put(c);
new_line;
get(c); -- Reads next character in input, and store that value in c
put(c);
new_line;
get(c); -- Reads next character in input, and store that value in c
put(c);
new_line;
get(c); -- Reads next character in input, and store that value in c
put(c);
new_line;
end inp2;
-- Blanks are read as characters. Newlines are skipped.
-- Input: xy z
-- Output:
--|x
--|y
--|
--|z
-- Input:
--|pq
--|
--|
--|rs
-- Output:
--|p
--|q
--|r
--|s