提交时间:2022-12-07 20:53:10

运行 ID: 14886

#include <stdio.h> int one(int a) { if (a % 2 == 0) { return 1; } else { return 0; } } int two(int a) { if (a > 4 && a <= 12) { return 1; } else { return 0; } } int main() { int juicer = 0; scanf("%d", &juicer); if (one(juicer) && two(juicer)) { printf("1 "); } else { printf("0 "); } if (one(juicer) || two(juicer)){ printf("1 "); } else { printf("0 "); } if ((one(juicer) && (!two(juicer))) || ((!(one(juicer))) && two(juicer))) { printf("1 "); } else { printf("0 "); } if (!one(juicer) && !two(juicer)) { printf("1 "); } else { printf("0 "); } return 0; }