I can't even get the criteria met for it to read the numbers from the keyboard, but somehow as if by magic, it works and meets 100% of the criteria when tested with IntelliJ IDEA. I've spent the last hour rewriting the code and it never seems to make a difference.
After close to an hour I even tried copy pasting another person's solution just to move past it and it won't accept ANYTHING.
Getting very frustrated, is the website broken or am I overly tired and messing up something silly?
package com.codegym.task.task04.task0418;
/*
Maximum of four numbers
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(br.readLine());
int b = Integer.parseInt(br.readLine());
int c = Integer.parseInt(br.readLine());
int d = Integer.parseInt(br.readLine());
int a1 = math(a, b);
int c1 = math(c, d);
int e = math(a1, c1);
System.out.println(e);
}
public static int math(int num1, int num2) {
if (num1>=num2)
return num1;
else
return num2;
}
}