![]() | ![]() |
|
|
Testo:eseguire un programma che inverta un array.
Program inverso
Var I,n,J,varapp:integer;
var inverti:array[1..100] of inte 212g61c ger;
begin
writeln ('quanti numeri vuoi immettere?,);
readln(n);
for I:=1 to n do
begin
writeln ('scrivi il numero nella cella',I);
readln(inverti[I]);
end;
for I:=n downto n/2 do
begin
for J:=1 to n/2 do
begin
varapp:=inverti[I];
inverti[I]:=inverti[J];
inverti[J]:=varapp;
write(inverti[j]);
end;
end;
end.
Privacy |
Articolo informazione
Commentare questo articolo:Non sei registratoDevi essere registrato per commentare ISCRIVITI |
Copiare il codice nella pagina web del tuo sito. |
Copyright InfTub.com 2025