随即生成一个0到100之间的整数,请猜测! <% String Re = "准备好咯吗?,猜数游戏开始咯"; if(session.getAttribute("result")!=null){ Re = (String)session.getAttribute("result"); } if(session.getAttribute("save") == null){ int num = (int)(Math.random()*100)+1; session.
import java.util.Scanner; public class Test{ public static void main(String args[]){ int i; Game game=new Game(); Scanner in=new Scanner(System.in); while(true){ System.out.println("\t\t\t欢迎光临猜数游戏"); System.out.println("\t1—开始游戏\t0-退出游戏"); i=in.next