随机生成30道小学二年级题目

package com.zuoye;

import java.util.Random;

public class Number {
public static void main(String args[]) {
Random random = new Random();
String[] arr1 = new String[4];
arr1[0]="+";
arr1[1]="-";
arr1[2]="*";
arr1[3]="/";
for (int i = 0; i < 30; i++) {
int a = random.nextInt(100);
int b = random.nextInt(4);
int c = random.nextInt(100);
System.out.println(a + " " + arr1[b] + " " + c + "=");
}
}
}

posted @ 2024-09-23 19:38  也祝她开心  阅读(52)  评论(0)    收藏  举报