Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.24 KB | None | 0 0
  1. var n, i, ans,temp:integer;
  2. begin
  3.    readln(temp);
  4.    ans:= temp;
  5.    while(temp <> 0) do begin
  6.       readln(temp);
  7.       if (temp<>0) and (temp > ans) and (temp mod 3 = 0) then
  8.          ans:=temp;
  9.    end;
  10.    
  11.    writeln(ans);
  12. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement