题解
2024-08-27 19:36:28
发布于:广东
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main()
{
char x;
cin>>x;
if(x=='a' or x=='A') cout<<"1";
else if(x=='b' or x=='B') cout<<"2";
else if(x=='c' or x=='C') cout<<"3";
else if(x=='d' or x=='D') cout<<"4";
else if(x=='e' or x=='E') cout<<"5";
else if(x=='f' or x=='F') cout<<"6";
else if(x=='g' or x=='G') cout<<"7";
else if(x=='h' or x=='H') cout<<"8";
else if(x=='i' or x=='I') cout<<"9";
else if(x=='j' or x=='J') cout<<"10";
else if(x=='k' or x=='K') cout<<"11";
else if(x=='l' or x=='L') cout<<"12";
else if(x=='m' or x=='M') cout<<"13";
else if(x=='n' or x=='N') cout<<"14";
else if(x=='o' or x=='O') cout<<"15";
else if(x=='p' or x=='P') cout<<"16";
else if(x=='q' or x=='Q') cout<<"17";
else if(x=='r' or x=='R') cout<<"18";
else if(x=='s' or x=='S') cout<<"19";
else if(x=='t' or x=='T') cout<<"20";
else if(x=='u' or x=='U') cout<<"21";
else if(x=='v' or x=='V') cout<<"22";
else if(x=='w' or x=='W') cout<<"23";
else if(x=='x' or x=='X') cout<<"24";
else if(x=='y' or x=='Y') cout<<"25";
else if(x=='z' or x=='Z') cout<<"26";
return 0;
}
这里空空如也
有帮助,赞一个