diff --git a/2207/C语言同步练习源码/6-预处理-3.c b/2207/C语言同步练习源码/6-预处理-3.c index 9886a8d..34b04f5 100644 --- a/2207/C语言同步练习源码/6-预处理-3.c +++ b/2207/C语言同步练习源码/6-预处理-3.c @@ -9,7 +9,7 @@ int main(){ while(str[i] != '\0'){ if(str[i] >= 'a' && str[i] <= 'y' || str[i] >= 'A' && str[i] <= 'Y' ){ str[i]++; - }else{ + }else if(str[i] == 'z' || str[i] == 'Z'){ str[i]-=25; } i++; diff --git a/2207/C语言同步练习答案.md b/2207/C语言同步练习答案.md index f92831d..ec6a732 100644 --- a/2207/C语言同步练习答案.md +++ b/2207/C语言同步练习答案.md @@ -918,7 +918,7 @@ int main(){ while(str[i] != '\0'){ if(str[i] >= 'a' && str[i] <= 'y' || str[i] >= 'A' && str[i] <= 'Y' ){ str[i]++; - }else{ + }else if(str[i] == 'z' || str[i] == 'Z'){ str[i]-=25; } i++;