第四课。

This commit is contained in:
unlockable
2022-10-07 12:29:08 +08:00
parent aedf18a247
commit c3608c3f89
4 changed files with 47 additions and 0 deletions

13
04/Exercise03.c Normal file
View File

@@ -0,0 +1,13 @@
#include <stdio.h>
int main() {
int people[3] = {0};
for (int i = 0; i < 3; i++) {
people[i] = 1;
if ((people[1] == 1 || people[1] == 0) && (people[2] == 1 || people[2] == 0) && (people[2] == 0 || people[2] == 1)) {
printf("%d %d %d\n", people[0], people[1], people[2]);
}
people[i] = 0;
}
return 0;
}