问答题

读程序写出运行结果
public class Demo{
     public  static void main(String []args){
         for(int month=3;month<=12;month=month+3){
            switch (month/3){
               case 1: {System.out.println("第一季度");
                           break;    }
               case 2: {System.out.println("第二季度");
                  break;
                      }
              case 3: {System.out.println("第三季度");
                         break;
                       }
              default: System.out.println("第四季度");
                      }  }     }}

答案: (1)
第一季度 ...
微信扫码免费搜题