第七周必做题。

This commit is contained in:
unlockable
2022-11-01 20:18:43 +08:00
parent 7d858762f4
commit 28898732bc
2 changed files with 51 additions and 0 deletions

14
07/Exercise02.c Normal file
View File

@@ -0,0 +1,14 @@
#include <stdio.h>
int main() {
int old, stand, lie;
for (old = 3; old < 97; old+=3) {
for (stand = 1; stand < 100 - old; stand++) {
lie = 100 - stand - old;
if ((lie*3 + stand*5 + old/3) == 100) {
printf("Stand: %d Lie %d Old: %d\n", stand, lie, old);
}
}
}
return 0;
}