随机出题

package suiji;

import java.io.IOException;

public class suiji {  public static void main(String[] args) throws IOException  {   int x,y,z;   for(int i=0;i<30;i++)   {    x=0+(int)(Math.random()*100);    y=0+(int)(Math.random()*100);    System.out.print(""+x);    z=0+(int)(Math.random()*4);        if(z==0)System.out.print(" + ");    if(z==1)System.out.print(" - ");    if(z==2)System.out.print(" * ");    if(z==3)System.out.print(" / ");        System.out.println(""+y+" = ?");   }  } }

 

 

 

一个寒假没有编程,对eclipse的操作已不熟练,VS卸载了还没有装。

posted @ 2015-03-06 21:38  啊啾有人想我  阅读(180)  评论(0编辑  收藏  举报