1 Star 1 Fork 4

懒羊羊 / Algorithm-note

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
6.1.4.c 353 Bytes
一键复制 编辑 原始数据 按行查看 历史
懒羊羊 提交于 2020-01-13 15:49 . C源码
#include <stdio.h>
int main(){
char a[100],b[100];
int i;
gets(a); //可替换scanf("%s",a);
for(i=0;a[i]!='\0';i++){
if(a[i]>='A'&&a[i]<='Z')
b[i]='Z'-a[i]+65;//大写字母A的ASCII码为65
else if(a[i]>='a'&&a[i]<='z')
b[i]='z'-a[i]+97;//小写字母a的ASCII码为97
else b[i]=a[i];
}
b[i]='\0';
puts(b); //可替换printf("%s",b);
return 0;
}
C
1
https://gitee.com/yang365/Algorithm-note.git
git@gitee.com:yang365/Algorithm-note.git
yang365
Algorithm-note
Algorithm-note
master

搜索帮助