子规鱼吧 关注:6贴子:163
  • 3回复贴,共1

Demo10 条件结构

只看楼主收藏回复

自古一楼不说事!


IP属地:河南1楼2017-07-27 14:54回复


    IP属地:河南2楼2017-07-27 14:55
    回复
      class Demo10
      {
      public static void main(String[] args)
      {
      int math = 91;
      if (math>90)
      System.out.println("very good!");
      int chinese =88;
      if (chinese>90)
      System.out.println("very good!");
      else
      {
      System.out.println("继续努力!");
      System.out.println("加油!");
      }
      int s = 98;
      if (s>90 && s<=100)
      System.out.println("A");
      else if (s>80)
      System.out.println("B");
      else if (s>70)
      System.out.println("C");
      else if (s>60)
      System.out.println("D");
      else
      System.out.println("E");
      }
      }


      IP属地:河南3楼2017-07-27 14:55
      回复
        mark


        IP属地:河南4楼2017-07-28 16:37
        回复