package fee;

import java.util.*;
import java.util.Random;

 

public class pp {
static Scanner in =new Scanner(System.in);
static Random r = new Random();
public static void main(String[] args) {

System.out.println("输入题目数量:");
int x= in.nextInt();

//int r1=r.nextInt(100);
//int r2=r.nextInt(100);
System.out.println("输入1表示加法2表示减3表示乘4表示除:");
int y = in.nextInt();
switch(y){
case 1:
for(int i=0;i<=x;i++)
{
int r1=r.nextInt(100);
int r2=r.nextInt(100);
System.out.println(r1+"+"+r2+"=");}break;
case 2:
for(int i=0;i<=x;i++)
{
int r1=r.nextInt(100);
int r2=r.nextInt(100);
System.out.println(r1+"-"+r2+"=");}break;
case 3:
for(int i=0;i<=x;i++)
{
int r1=r.nextInt(100);
int r2=r.nextInt(100);
System.out.println(r1+"*"+r2+"=");}break;
case 4:
for(int i=0;i<=x;i++)
{
int r1=r.nextInt(100);
int r2=r.nextInt(100);
System.out.println(r1+"/"+r2+"=");}break;
}


}

}

相关文章:

  • 2022-01-30
  • 2021-04-10
  • 2021-07-29
  • 2021-07-10
  • 2021-12-13
猜你喜欢
  • 2021-12-24
  • 2021-12-31
  • 2021-12-14
  • 2021-12-30
  • 2021-11-17
相关资源
相似解决方案