Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const nmax=100;
- type vector=array[1..nmax] of integer;
- var
- a:vector;
- n,i,max:integer;
- begin
- read(n);
- for i:=1 to n do
- read(a[i]);
- for i:=1 to n do
- if(a[i] mod 2 = 0) then
- max:=a[i];
- for i:=1 to n do
- if(a[i] mod 2 = 0) and (a[i]>max) then
- max:=a[i];
- write(max);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement