All pastes #761244 Raw Edit

Jemand

public text v1 · immutable
·published 2007-11-04 18:53 UTC
rendered paste body
public class Calc {
	public static void main(String[] args)
	{
	double x;
	double y;
	double result;
	int Command;
	x=Double.parseDouble(args[0]);
	Command=Integer.parseInt(args[1]);
	y=Double.parseDouble(args[2]);
	result = Command;
	if (Command == 1) result = x+y; 
	if (Command == 2) result = x-y;
	if (Command == 3) result = x*y;
	if (Command == 4) result = x/y;
	//else System.out.println("Wrong Input");
	
	System.out.println(result);

}
}