上午无课,依照民间大学生生活条例,睡过去就好,下午按课表接受建民的教育 package com; import java.util.Random; import java.util.Scanner; public class scx { public static void main(String[] args) { Random r = new Random(); int rand; for(int i=0;i<30;i++) { int r1=r.nextInt(100); int r2=r.nextInt(100); rand=r2%4; if(rand==0) { System.out.println(r1+"+" +r2+"=" ); } else if(rand==1) { System.out.println(r1+"-" +r2+"=" ); } else if(rand==2) { System.out.println(r1+"x" +r2+"=" ); } else if(rand==3) { System.out.println(r1+"/" +r2+"=" ); } } } } 以上为教育结果,敬请过目
标签:rand,r1,r2,int,System,9.11,out From: https://www.cnblogs.com/liyize/p/17694511.html