当前位置:网站首页>Exercise 7-7 string replacement (15 points)

Exercise 7-7 string replacement (15 points)

2022-06-13 09:25:00 Hezeze

 Insert picture description here

#include <stdio.h>
int main () {
    
    int i;
    char a[81];
    gets (a);
    for (i=0;a[i]!='\0';i++) {
    
        if (a[i]>='A'&&a[i]<='Z') {
    
            a[i]=a[i]+('Z'+'A'-2*a[i]);
        }
    }
    puts (a);
    return 0;
}

原网站

版权声明
本文为[Hezeze]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270531585059.html