课堂测试
课堂测试1: import java.util.Random; public class Sapp { public static void main(String[] args) { Random ran=new Random(); for(int i=1;i<31;i++) { int a=ran.nextInt(100); int b=ran.nextInt(100); int c=ran.nextInt(4); if(c==0) { System.out.print(i+"."); System.out.println(a+"+"+b+"="); } else if(c==1&&a>=b) { System.out.print(i+"."); System.out.println(a+"-"+b+"="); } else if(c==2&&a*b<100) { System.out.print(i+"."); System.out.println(a+"*"+b+"="); } else if(c==3&&b!=0&&a%b==0) { System.out.print(i+"."); System.out.println(a+"/"+b+"="); } else { i--; } } } } 课堂测试2: import java.util.Scanner; import