:(
Please help.
All but the last conditions are met.
I do think my code should be returning the correct answer, but, it wont verify.
Resolved
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
7 January 2019, 01:32
the line System.out.println(min(5, 5, 10)); returns 10 where it should return 5. Using that as a step through
if ( 5 < 5) = false && (5 < 10) true - line is false
else if (5 <5) false && (5 < 10) true - line is false
else return 10
↑ problem
+1
Kyar Phyu
7 January 2019, 18:21
That's right, bro. The solution must be thinked about equal condition for finding the minimum of three numbers because the main method is calling the min method with two equal parameters.
+1
Jeff Jeffy
7 January 2019, 01:25
Also, 3 views already!?
0
zurab esartia
7 January 2019, 07:55
public static int min(int a, int b, int c) {
//write your code here
int min2;
if((a<b)
min2=a;
else
min2=b;
if((min2>c)
min2=c;
return min2;
}
0