A New Alphabet

题目链接:https://nanti.jisuanke.com/t/32763

解题思路:简单的字符替换,注意"\\"才是\

代码实例:

#include
#include
using namespace std;
int main()
{
	string Replace[30] = {"@","8","(","|)","3","#","6","[-]",
	"|","_|","|<","1","[]\\/[]","[]\\[]","0","|D","(,)",
	"|Z","$","']['","|_|","\\/","\\/\\/","}{","`/","2"};
	string str;
	getline(cin,str);
	for(int i = 0;str[i];i++){
		if(isalpha(str[i])){
			str[i] = tolower(str[i]);
			cout << Replace[str[i]-'a'];
		}else	cout<

 

转载于:https://www.cnblogs.com/long98/p/10352170.html

你可能感兴趣的:(A New Alphabet)