TÓPICO

Pascal 1066 - Compilation error

sorryizaque perguntou 4 years ago

program Uri; uses crt, sysutils; {COPERATION ON} var ary : array[1..5] of int64 ; a, p, i, pst, ngt : int64 ;

begin p:=0;i:=0;pst:=0;ngt:=0; readln(ary[1],ary[2],ary[3],ary[4],ary[5]);

for a := 1 to 5 do
begin
    if ary[a] > 0 then pst+=1;
    if ary[a] < 0 then ngt+=1;
    if ary[a] mod 2 = 0 then p+=1;
    if ary[a] mod 2 <> 0 then i+=1;
end;
writeln(p,' valor(es) par(es)');
writeln(i,' valor(es) impar(es)');
writeln(pst,' valor(es) positivo(s)');
writeln(ngt,' valor(es) negativo(s)');

end.

Este tópico foi resolvido e não pode receber novas respostas.