poj 1048

#include<iostream>
#include<cstring>
#include<map>
using namespace std;
int main()
{
	char a[200],b[200],c[200];
	map<char,char> map1;
	int len,i;
	map1['A']='V';
	map1['B']='W';
	map1['C']='X';
	map1['D']='Y';
	map1['E']='Z';
	map1['F']='A';
	map1['G']='B';
	map1['H']='C';
	map1['I']='D';
	map1['J']='E';
	map1['K']='F';
	map1['L']='G';
	map1['M']='H';
	map1['N']='I';
	map1['O']='J';
	map1['P']='K';
	map1['Q']='L';
	map1['R']='M';
	map1['S']='N';
	map1['T']='O';
	map1['U']='P';
	map1['V']='Q';
	map1['W']='R';
	map1['X']='S';
	map1['Y']='T';
	map1['Z']='U';
	while(gets(a)&&strcmp(a,"ENDOFINPUT"))
	{
		while(gets(b)&&strcmp(b,"END"))
		{
			len=strlen(b);
			for(i=0;i<len;i++)
			{
				if(b[i]>='A'&&b[i]<='Z')
					cout<<map1[b[i]];
				else
					cout<<b[i];
			}
			cout<<endl;
		}
	}
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值