第一次写的代码

来源:互联网 发布:sql 分组求和汇总 编辑:程序博客网 时间:2024/05/21 13:22
import javax.swing.JOptionPane;
class add{
public static void main(String[]fff){
String x =JOptionPane.showInputDialog(null,"请输入长");
int s =Integer.parseInt(x);
String y =JOptionPane.showInputDialog(null,"请输入宽");
int h =Integer.parseInt(y);
JOptionPane.showMessageDialog(null,"长方形的面积是"+s*h);
}
}
原创粉丝点击