I am missing something but stumped..
package com.codegym.task.task02.task0217;
/*
Minimum of four numbers
*/
public class Solution {
public static int min(int a, int b, int c, int d) {
//write your code here
this.min(a,b);
int answer1 = min(a,b);
int answer2 = 0;
if (c<=d)
{
answer2 = c;
}
else
{
answer2 = d;
}
if (answer1 <= answer2){
return answer1;}
else if {return answer2;}
}
public static int min(int a, int b) {
//write your code here
int answer1=1;
if (a<=b){
answer = a;} //20
else
{answer = b;}
return answer;
}
}
public static void main(String[] args) throws Exception {
System.out.println(min(-20, -10));
System.out.println(min(-20, -10, -30, -40));
System.out.println(min(-20, -10, -30, 40));
System.out.println(min(-40, -10, -30, 40));
}
}