回復 2# buy
public class test_1024
{
public static void main(String args[])//throws IOException
{
System.out.println(min(6,11));
System.out.println(add(6,11,20));
System.out.println(sub(6,11));
System.out.println(Abs(6,11));
}
public static int min(int a,int b)
{
return (a<b)?a:b;
}
public static int add(int a,int b,int c)
{
return (a+b+c);
}
public static int sub(int a,int b)
{
return (a>b)?(a-b)b-a);
}
public static int Abs(int a,int b)
{
return (a>b)?(a-b)b-a);
}
} |