四则运算

package yunsuan;

import java.util.Random;

public class Demo {

public static void main(String[] args) {
char arr[] = {'+','-','*','/'};
int g = 100;
Random random = new Random();
for(int i=0;i<100;i++)
{
int u=-random.nextInt()%g;
int v=-random.nextInt()%g;
char w=arr[random.nextInt(4)];
System.out.println(u+" "+w+" "+v+"=");
}
}
}

posted @ 2017-03-07 15:06  大爷你好  阅读(99)  评论(0编辑  收藏  举报