分类：电脑/网络-互联网
问题：用JAVA编写一个猜数游戏 
回答：源  看看 给你个思路 import javax.swing.JOptionPane;    public class T {      public static void main(String[] args) {         int("给你一个1~100之间的整数，你猜:");        int daan = (int) (Math.random() * 100) + 1;        int shuru = 0;   String xianshi =  owInputDialog("输入你猜的数");        shuru =  rseInt(xianshi);        while (shuru != daan) {          if (shuru > daan) {     xianshi =  owInputDialog("你猜大了，再猜");            shuru =  rseInt(xianshi);          } else if (shuru < daan) {     xianshi =  owInputDialog("你猜小了，再猜");            shuru =  rseInt(xianshi);          }        }         int("你猜对了！");      }    }  没有考虑到异常处理，参考吧