for (int i = 0; i < 10000; i++) {
String shop1="";
Random rd1 = new Random();
String[] strs1 = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","11","12","13","14","15","16","17","18","19","20"};
int num1 = rd1.nextInt(strs1.length);
shop1 = strs1[num1];
String shop2="";
Random rd2 = new Random();
String[] strs2 = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","10","11","12","13","14","15","16","17","18","19","20"};
int num2 = rd2.nextInt(strs2.length);
shop2 = strs2[num2];
String shop="";
Random rd = new Random();
String[] strs = {"+","-"};
int num = rd.nextInt(strs.length);
shop = strs[num];
String a= shop1+shop+shop2+"=";
if (Integer.valueOf(shop1)+Integer.valueOf(shop2)<20 && Integer.valueOf(shop1)-Integer.valueOf(shop2)>0){
System.out.println(a);
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)