首页 > 其他 > 详细

POJ 2141

时间:2015-02-21 09:40:20      阅读:302      评论:0      收藏:0      [点我收藏+]

继续水

技术分享
 1 #include <iostream>
 2 #include <cstdio>
 3 #include <cstdlib>
 4 #include <cstring>
 5 using namespace std;
 6 
 7 char f[30];
 8 char st[100];
 9 
10 int main()
11 {
12     gets(f);
13     gets(st);
14     for (int i = 0; i < strlen(st); i++)
15     {
16         if (st[i] <=Z && st[i] >= A)
17             printf("%c",f[st[i] - A] - a + A);
18         else if (st[i] <=z && st[i] >= a)
19             printf("%c", f[st[i] - a]);
20         else
21             printf("%c", st[i]);
22     }
23     printf("\n");
24     return 0;
25 }
View Code

 

POJ 2141

原文:http://www.cnblogs.com/jie-dcai/p/4296838.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!