修改文件结构。

This commit is contained in:
unlockable
2023-02-21 10:56:54 +08:00
parent a64cfdd9f3
commit 40182871f4
83 changed files with 0 additions and 0 deletions

12
POP/06/Optional01.c Normal file
View File

@@ -0,0 +1,12 @@
#include <stdio.h>
int main() {
int apple[6] = {0};
int childCount = 4;
apple[5] = 11;
for (;childCount > 0; childCount--) {
apple[childCount] = (apple[childCount+1] * (childCount + 1) + 1)/childCount;
}
printf("Total number of apple: %d\n 1: %d\n 2: %d\n 3: %d\n 4: %d\n 5: %d\n", apple[1], apple[1]-apple[2], apple[2]-apple[3], apple[3]-apple[4], apple[4]-apple[5], apple[5]);
return 0;
}