这题直接用绝对值函数很方便
#include <stdio.h>
#include <math.h>//注意引用math头文件
void main() {
int x, y;
scanf("%d %d", &x, &y);
if (abs(x)<=1&&(abs(y)<=1)) {
printf("yes");
}
else {
printf("no");
}
}
这题直接用绝对值函数很方便
#include <stdio.h>
#include <math.h>//注意引用math头文件
void main() {
int x, y;
scanf("%d %d", &x, &y);
if (abs(x)<=1&&(abs(y)<=1)) {
printf("yes");
}
else {
printf("no");
}
}