第七周必做题。
This commit is contained in:
14
07/Exercise02.c
Normal file
14
07/Exercise02.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user