zoukankan      html  css  js  c++  java
  • 软件工程个人作业01

    设计思想:

    随机生成数,两个用来当做运算符两边的数字,一个用来判断运算符,循环30次输出

    import java.lang.Math;
    public class erzhuzi {
      public static void main(String[] args){
        for(int i=0;i<30;i++)
        {
          int firstone = (int) (Math.random()*100);
          int secondone = (int) (Math.random()*100);
          int yunsuanfu = (int) (1+Math.random()*4);
          if (yunsuanfu==1)System.out.println(firstone+"+"+secondone+"=");
          if (yunsuanfu==2)System.out.println(firstone+"-"+secondone+"=");
          if (yunsuanfu==3)System.out.println(firstone+"*"+secondone+"=");
          if (yunsuanfu==4&&secondone!=0)System.out.println(firstone+"/"+secondone+"=");
        }
      }

    }

    上课未完成原因:太笨了

  • 相关阅读:
    mysql调优
    面试、。。。。
    StringBuffer 和 StringBuilder 的 3 个区别
    msql查询指定日期
    Windows 路由跟踪
    Xdebug配置
    ONVIF流媒体播放流程
    Windows 8 SP1 安装StockTrader 6.1
    使用log4c问题
    xcode插件安装
  • 原文地址:https://www.cnblogs.com/nxxam/p/5263180.html
Copyright © 2011-2022 走看看