public class MyMath{
private static void max(int x,int y,int z){
if(x>y){
if(x>z){
System.out.println("最大数是X:"+x);
}
else{
System.out.println("最大数是Z:"+z);
}
}
else{
if(y>z){
System.out.println("最大数是y:"+y);
}
else{
System.out.println("最大数是Z:"+z);
}
}
}
private static void min(int x,int y,int z){
if(x
}
if(y
}
if(z
}
}
private static void sum(int x,int y,int z){
int h=x+y+z;
System.out.println("x,y,z的总和为:"+h);
}
private static void average(int x,int y,int z){
int h=x+y+z;
double a=h/3;
System.out.println("x,y,z的平均为:"+a);
}
public static void main(String[] args) {
int x=2;
int y=3;
int z=4;
max(x,y,z);
min(x,y,z);
sum(x,y,z);
average(x, y, z);
}
}
public static void main(String []a){
System.out.println(