Skip to content

Instantly share code, notes, and snippets.

@ilyaBrandon
Created February 23, 2016 18:48
Show Gist options
  • Select an option

  • Save ilyaBrandon/93a14c7dd4d0b5859670 to your computer and use it in GitHub Desktop.

Select an option

Save ilyaBrandon/93a14c7dd4d0b5859670 to your computer and use it in GitHub Desktop.
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