代码改变世界

逻辑覆盖的应用

2016-04-15 19:39  果冻大魔王  阅读(142)  评论(0)    收藏  举报

import java.util.Scanner;

 

public class test32 {

    public static void mian(String[] args){

       Scanner scanner = new Scanner(System.in);

       int x = scanner.nextInt();

       int y = scanner.nextInt();

       if (x<4 || y>0) {

           if (y>1) {

              y=y+1;

           }

       }else {

           if (x>=5) {

              x=x-y;

           }else {

              x=x+y;

           }

       }

    }

}