Class did not make the reason: Because a long time did not do programming, write code, some of the Java language has long been forgotten, after a good review of Java.
Programming idea: Using Math.random to randomly generate integers within 100, using character arrays to define subtraction symbols, and to consider dividing two numbers, the denominator is not 0;
and then output it.
Source:
public class Suiji {
public static void Main (String args[])
{int i,j,y,h,g,f; Char x[]={42,43,45,47};
for (h=0;h<30;h++)
{i= (int) (Math.random () *99+0);
y= (int) (Math.random () *x.length+0);
j= (int) (Math.random () *99+1);
g= (int) (Math.random () *99+0);
f= (int) (Math.random () *99+1);
System.out.println ("(" +i+ "/" +j+ ")" +x[y]+ "(" +g+ "/" +f+ ")" + "=");
System.out.println ("(" +i+ x[y]+ g+ ")" + "="); }
}
}
Program:
The third job of software introduction