Files
BasicsOfComputerSoftwareEng…/POP/07/Exercise02.c
2023-02-21 10:56:54 +08:00

14 lines
355 B
C

#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;
}