public class test02 { static int Add(int a, int b){ return a+b; } static int Sub(int a, int b){ return a-b; } static int Mul(int a, int b){ return a*b; } static int Div(int a, int b){ return a/b; } public static void main(String[] args) {
int a=0; int b=0; String c=""; for (int i=0;i<args.length;i++){ a = Integer.parseInt(args[0]); c = args[1]; b = Integer.parseInt(args[2]);
} if (c.equals("+")){
System.out.println( Add(a,b));
} else if (c.equals("-")){
System.out.println( Sub(a,b));
} else if (c.equals("*")){ System.out.println( Mul(a,b));
} else if (c.equals("/")){ System.out.println( Div(a,b));