Created
February 17, 2016 12:53
-
-
Save alexejVasko/3629b643b5cf915e5f57 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 Min { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
System.out.println(min(19,5,-9)); | |
} | |
static int min(int a, int b, int c){ | |
int x = 0; | |
if (a<b && a<c){ | |
x = a; | |
} | |
if (b<a && b<c){ | |
x = b; | |
} | |
if (c<a && c<b){ | |
x=c; | |
} | |
return x; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment