首页 > 代码库 > 300题

300题

package jsx1;

public class text {

public static void main(String[] args) {
int b;
for (int i = 0; i <= 300; i++) {
int a = (int) (Math.random() * 100);
b = (int) (Math.random() * 100);

if (b != 0) {
System.out.println(a + "/" + b + "=" + (a / b));
System.out.println("商取整数!");

} else

技术分享 {System.out.println("被除数不能为0");

}

System.out.println(a + "+" + b + "= " + (a + b));
System.out.println(a + "-" + b + "= " + (a - b));
System.out.println(a + "*" + b + "= " + (a * b));

}

}
}

300题