👤

Se da un tablou liniar cu n componente numere intregi.Calculati suma componentelor lui.(VA ROG URGENT IN PASCAL!!!!)

Răspuns :

Program Tema;

var   tablou:array [1..100] of integer;
    n,s:integer;
Begin
s:=0;
writeln('Introduceti dimensiunea tabloului: ');
readln(n);
writeln('Introduceti elementele tabloului:');
for i=1 to n do
begin;
read(tablou[i]);
s:=s+tablou[i];
end;
writeln('Suma termenilor este: ',s);
End.