能帮忙做成文件发给我么 谢谢了!! 7五188五六88
我电脑配置不起 谢谢了
已发邮件 请查收
能帮忙做成文件发给我么 谢谢了!! 7五188五六88
追答直接粘贴过去不就好了。下面这个好点儿。
package com.ly.a;
import javax.swing.JOptionPane;
public class b {
public static void main(String[] args) {
int a=Integer.parseInt(JOptionPane.showInputDialog("你输入出生的年月日"));
int n;
String an[]=new String[]{
"鼠","牛","虎","兔",
"龙","蛇","马","羊",
"猴","鸡","狗","猪" };
switch(a){
case 1984:
JOptionPane.showMessageDialog(null, an[0]);
break;
case 1985:
JOptionPane.showMessageDialog(null, an[1]);
break;
case 1986:
JOptionPane.showMessageDialog(null, an[2]);
break;
case 1987:
JOptionPane.showMessageDialog(null, an[3]);
break;
case 1988:
JOptionPane.showMessageDialog(null, an[4]);
break;
case 1989:
JOptionPane.showMessageDialog(null, an[5]);
break;
case 1990:
JOptionPane.showMessageDialog(null, an[6]);
break;
case 1991:
JOptionPane.showMessageDialog(null, an[7]);
break;
case 1992:
JOptionPane.showMessageDialog(null, an[8]);
break;
default:
JOptionPane.showMessageDialog(null, "猪");
}
}
}