Created
February 23, 2016 18:48
-
-
Save ilyaBrandon/93a14c7dd4d0b5859670 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
| public class BATTLEFRONT { | |
| public static void main(String[] args) { | |
| System.out.println(min(-19, 5, -912)); | |
| System.out.println(min(-666, 9, -6)); | |
| System.out.println(min(-14, 3, -3000)); | |
| } | |
| static int min(int a, int b, int c) { | |
| if (a < b) { | |
| if (a < c) { | |
| return a; | |
| } | |
| } else if (b < c) { | |
| return b; | |
| } | |
| return c; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment