public class Div {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
float x=1f;
float y=1f;
if(args.length>1)
{
try {
x=Float.parseFloat(args[0]);
y=Float.parseFloat(args[1]);
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
//e.printStackTrace();
System.out.println("格式不正确!!");
System.exit(-1);
}
if(y==0)
System.out.println("分母不能为零!!");
else
{
float res=x/y;
System.out.println(res);
}
}
}
}