1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【额外练习】选择结构/7-39 选择-矩形切割.c

18 lines
269 B
C
Raw Normal View History

2024-11-02 14:07:00 +00:00
#include <stdio.h>
int main() {
double a, b, m, n;
scanf("%lf%lf%lf%lf", &a, &b, &m, &n);
if (m == a && n == b) {
printf("3\n");
} else if (m == a || n == b) {
printf("4\n");
} else {
printf("5\n");
}
return 0;
}