Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public class Main {
  2.     public static void main(String[] args) {
  3.         System.out.println(numMin4(3,4,6, 5));
  4.     }
  5.  
  6.     public static int numMin4(int a, int b, int c, int d) {
  7.         return (numMin2(a, b) < c) ? ((numMin2(a, b) < d) ? numMin2(a, b) : d) : ((c < d) ? c : d);
  8.     }
  9.  
  10.     public static int numMin2(int x, int y) {
  11.         return x<y ? x:y;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement