组合题6 个小题
已作答 0 / 6
1#include <cstdio>2#include <cstring>3using namespace std;4char st[100];5int main() {6 scanf("%s", st);7 int n = strlen(st);8 for (int i = 1; i <= n; ++i) {9 if (n % i == 0) {10 char c = st[i - 1];11 if (c >= 'a')12 st[i - 1] = c - 'a' + 'A';13 }14 }15 printf("%s", st);16 return 0;17}若将第 8 行的 i = 1 改为 i = 0,程序运行时会发生错误。()