Skip to content

Instantly share code, notes, and snippets.

@StrixG
Created September 30, 2015 15:11
Show Gist options
  • Save StrixG/bb41fc980a819427bb20 to your computer and use it in GitHub Desktop.
Save StrixG/bb41fc980a819427bb20 to your computer and use it in GitHub Desktop.
Java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int c = in.nextInt();
System.out.println(Math.max(a, Math.max(b, c)));
}
}
@enticey
Copy link

enticey commented Jan 1, 2017

Always close the scanner once you're done with it.

in.close();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment