修改文件结构。

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

17
POP/05/Optional03.c Normal file
View File

@@ -0,0 +1,17 @@
#include <stdio.h>
int main() {
int N = 0, count[3] = {0};
// Count[0] stores the number of occerence of 5, [1] counts for 6, [2] counts for 7
scanf("%d", &N);
while (N > 0) {
switch (N % 10) {
case 5: count[0]++; break;
case 6: count[1]++; break;
case 7: count[2]++; break;
}
N /= 10;
}
printf("%d %d %d", count[0], count[1], count[2]);
return 0;
}