Skip to content

Instantly share code, notes, and snippets.

@alexejVasko
Created February 17, 2016 12:53
Show Gist options
  • Save alexejVasko/3629b643b5cf915e5f57 to your computer and use it in GitHub Desktop.
Save alexejVasko/3629b643b5cf915e5f57 to your computer and use it in GitHub Desktop.
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