解题思路:
注意事项:
strlen()这个函数虽然在string里也有,我用vs运行也没错,但是在这个网站编译器中需要包含的头文件是<cstring>
参考代码:
#include<iostream>
#include<iomanip>
#include<cstring>
using namespace std;
int main()
{
char a[100];
cin.get(a, 100);
for (int i = 0; i < strlen(a); i++)
{
if (a[i] > 96&& a[i] < 122)
a[i] = a[i] + 1;
else if (a[i] == 122)
a[i] = 97;
}
for (int i = 0; i < strlen(a); i++)
cout << a[i];
return 0;
}
0.0分
0 人评分
求圆的面积 (C语言代码)浏览:1270 |
拆分位数 (C语言代码)浏览:1327 |
【简单计算】 (C语言代码)浏览:622 |
WU-输出正反三角形 (C++代码)浏览:1018 |
【金明的预算方案】 (C++代码)浏览:841 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:503 |
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:699 |
幸运数 (C++代码)浏览:1261 |
C语言程序设计教程(第三版)课后习题9.10 (C语言代码)浏览:832 |
蚂蚁感冒 (C语言代码)浏览:1330 |