参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int x = scanner.nextInt(); int y = scanner.nextInt(); boolean flag = x <= 1 && x >= -1 && y <= 1 && y >= -1; System.out.print(flag ? "yes" : "no"); } }
0.0分
5 人评分