09: Password translation, 09: Password Translation

Source: Internet
Author: User

09: Password translation, 09: Password Translation
09: Password Translation

  • View
  • Submit
  • Statistics
  • Question
Total time limit:
1000 ms
Memory limit:
65536kB
Description

In the process of intelligence transmission, in order to prevent intelligence interception, we often need to encrypt the intelligence in a certain way. Although simple encryption algorithms are not enough to completely prevent intelligence deciphering, however, it can still prevent intelligence from being easily identified. We provide a simplest encryption method for a given string, replace the letters from a-y, A-Y with its successor letters, replace z and Z with a and A. If other non-letter characters remain the same, a simple encrypted string is obtained.

Input
Enter a line containing a string of less than 80 characters.
Output
Output the encrypted string of each string.
Sample Input
Hello! How are you!
Sample output
Ifmmp! Ipx bsf zpv!
Source
Computing overview 05
 1 #include<iostream> 2 #include<cstring> 3 #include<cstdio> 4 using namespace std; 5 char a[10001]; 6 int main() 7 { 8     gets(a); 9     int l=strlen(a);10     for(int i=0;i<l;i++)11     {12         if(a[i]=='z')a[i]='a';13         else if(a[i]=='Z')a[i]='A';14         else if((a[i]>='A'&&a[i]<='Z')||(a[i]>='a'&&a[i]<='z'))15         a[i]=a[i]+1;16     }17     puts(a);18     return 0;19 }

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.