| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
除了输入空格这一点以外难度系数为0,听说还买一送一?溜达看看去#include<iostream>
#include<Cstdio>
#include<string>
using namespace std;
char input1[10], input2[10];
char input[10000];
int main()
{
char *p, temp;
int temp1;
while(1)
{
scanf("%s", input1);
getchar();
if(input1[3] == 'O')
break;
p = input;
while((temp = getchar()) != '\n')
{
*p = temp;
p ++;
}
*p = '\0';
//cout << input << endl;
scanf("%s", input2);
p = input;
while(*p != '\0')
{
temp1 = -1;
if((*p -'A' >= 0) && (*p -'A' <= 25))
temp1 = *p - 'A';
if((*p -'a' >= 0) && (*p -'a' <= 25))
temp1 = *p - 'a';
if(temp1 != -1)
{
temp1 = (temp1 + 21) % 26;
*p = 'A' + temp1;
}
p++;
}
cout << input << endl;
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator