Var a, B, C, D, n:integer;
V:array [1.. 15] of integer ;
Begin
Clrscr ;
Writeln ('vvod kol-va elementov massiva ') ;
Readln (n) ;
Writeln (' vvod a') ;
Readln (a) ;
Writeln ('vvod b') ;
Readln (b) ;
Randomize n
For i :=1 to n do begin
V[i] := a+random (b) ;
Write (v[i] :5);
If v[i] mod 2=0 then c:=c+v[i] else d:=d+v[i] ;
End;
Writeln ('summa chetn =', c) ;
Writeln ('summa nechet=', d) ;
Readln ;
End.
Var a, B, C, D, n:integer;
V:array [1.. 15] of integer ;
Begin
Clrscr ;
Writeln ('vvod kol-va elementov massiva ') ;
Readln (n) ;
Writeln (' vvod a') ;
Readln (a) ;
Writeln ('vvod b') ;
Readln (b) ;
Randomize n
For i :=1 to n do begin
V[i] := a+random (b) ;
Write (v[i] :5);
If v[i] mod 2=0 then c:=c+v[i] else d:=d+v[i] ;
End;
Writeln ('summa chetn =', c) ;
Writeln ('summa nechet=', d) ;
Readln ;
End.