标签:system mat static ring main rand public class out
public class a300 {
public static void show(Object j){
System.out.println(j);
}
public static void main(String[] args){
for(int i=0;i<300;i++){
int a = (int)(Math.random()*100)+1;//随机数1到100
int b = (int)(Math.random()*100)+1;
int c = (int)(Math.random()*4)+1;//随机数1到4
if(c==1) show(a + "+" + b + "=");
else if(c==2) show(a + "-" + b + "=");
else if(c==3) show(a + "*" + b + "=");
else if(c==4) show(a + "/" + b + "=");
}
show("一共有:300到题"); } }
标签:system mat static ring main rand public class out
原文地址:http://www.cnblogs.com/wjb05/p/6538970.html