Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var n, i, ans,temp:integer;
- begin
- readln(temp);
- ans:= temp;
- while(temp <> 0) do begin
- readln(temp);
- if (temp<>0) and (temp > ans) and (temp mod 3 = 0) then
- ans:=temp;
- end;
- writeln(ans);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement