|
|
|
@ -111,12 +111,10 @@ public class Computer extends JFrame{
|
|
|
|
|
public void actionPerformed(ActionEvent arg0) {
|
|
|
|
|
a = xsArea.getText();
|
|
|
|
|
String[] sz = new String[2];
|
|
|
|
|
//分割字符串:+ 或 - 或 * 或 /
|
|
|
|
|
sz=a.split("\\+|\\-|\\*|\\/");//把分割的两个部分放进sz中
|
|
|
|
|
sz=a.split("\\+|\\-|\\*|\\/");
|
|
|
|
|
double b = 0;
|
|
|
|
|
if(flag == 0) {
|
|
|
|
|
//输出原数
|
|
|
|
|
b = Double.parseDouble(a);
|
|
|
|
|
b = Double.parseDouble(a);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if(flag == 1) {
|
|
|
|
|