Created
February 17, 2016 13:18
-
-
Save alexejVasko/bafde4b9b823d0a2185e 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
package logic; | |
public class MinElseIf { | |
public static void main(String[] args) { | |
System.out.println(min(-19,5,-9)); | |
} | |
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