Advertisement
bobo_bobkata

Untitled

Jan 20th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. public static void main(String[] args) {
  2.         vlado met = new vlado();
  3.         Scanner scanner = new Scanner(System.in);
  4.         int numOne = Integer.parseInt(scanner.nextLine());
  5.         int numTwo = Integer.parseInt(scanner.nextLine());
  6.         int numThree = Integer.parseInt(scanner.nextLine());
  7.         System.out.println(met.sum(numOne, numTwo, numThree));
  8.     }
  9.  
  10.     private int sum(int a, int b, int c) {
  11.         int max = a;
  12.         if (b > max) {
  13.             max = b;
  14.         }
  15.         if(c>max){
  16.             max=c;
  17.         }
  18.         return max;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement