Za pomocą pętli FOR pobierz do tablicy 5 imion, a następnie wyświetl je od końca.
program ptl;uses crt;varimiona:array[1..5] of string;i:integer;beginclrscr;for i := 1 to 5 do beginWriteln('Podaj ',i,' imie');readln(imiona[i]);end;clrscr;for i := 5 downto 1 doWriteln(imiona[i]);readln;end.
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
program ptl;
uses crt;
var
imiona:array[1..5] of string;
i:integer;
begin
clrscr;
for i := 1 to 5 do begin
Writeln('Podaj ',i,' imie');
readln(imiona[i]);
end;
clrscr;
for i := 5 downto 1 do
Writeln(imiona[i]);
readln;
end.