Created
September 13, 2020 21:51
-
-
Save gonaumov/ed945db3482160953bc92cf7fd073a2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int max = 0; | |
while (scanner.hasNextInt()) { | |
int input = scanner.nextInt(); | |
if (input % 4 == 0 && input > max) { | |
max = input; | |
} | |
} | |
System.out.println(max); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment