0
Find the greatest among three integer.
2 Antworten
+ 3
use max () built in function 2 times..to reduce code
0
public class Program
{
public static void main(String[] args) {
int x=5, y=9, z=12, big;
if (x>y&&x>z) {
big=x;
}
else if(y>x&&y>z){
big=y;
}
else {
big=z;
}
System.out.println(big);
}
}