当前位置:网站首页>C191: password compilation
C191: password compilation
2022-07-27 20:01:00 【Qiangan】
Problem description :
There is a line of telegram , It has been translated into a password according to the following rules :
A>>Z a>>z
B>>Y b>>y
C>>X c>>x
. .
. .
. .
wait . That is to say 1 The first letter becomes the 26 Letters , The first i The first letter becomes the (26-i+1) Letters , Non alphabetic characters remain unchanged , Require the programmer to translate the password into the original .
Enter description :
Enter a string of characters ( contain 7 Elements ), The password .
The output shows that :
Output its corresponding characters ( contain 7 Elements ), Express the original text .
sample input :
ABCDEFG
sample output :
ZYXWVUT
#include<stdio.h>
int main()
{
char m[7];
int i;
scanf("%s",m);
for(i=0;i<7;i++)
{
if(m[i]>='A'&&m[i]<='Z')
{
m[i]='A'+26-(m[i]-'A'+1);
}
else if(m[i]>='a'&&m[i]<='z')
{
m[i]='a'+26-(m[i]-'a'+1);
}
}
for(i=0;i<7;i++) printf("%c",m[i]);
return 0;
}
边栏推荐
- 【IoT】卫朋:6000+ 字解读 | 2022年产品人必备的7个产品管理工具(1.0版)
- Sqlife (database)
- 【OpenBMC 系列】4.启动流程 使用qume模拟ast2600-evb
- PMP每日一练 | 考试不迷路-7.27(包含敏捷+多选)
- VirtualBox: set shared folder
- VALN 11.9
- ContentProvider of four components
- China business CDP white paper | love Analysis Report
- 黑客入门教程(非常详细)从零基础入门到精通,看完这一篇就够了。
- Object常用方法学习【clone和equals】
猜你喜欢
随机推荐
常见运算符9.21
transformers-bert
How to encrypt the data in MySQL database? Mysql8.0 comes with new features
Gestureoverlayview (gesture recognition 2)
静态试验。2021.01 .13
[RCTF2015]EasySQL-1|SQL注入
第3章 基本操作
vlan试验2021.1.14
全局函数
Hacker introductory tutorial (very detailed) from zero basic introduction to proficiency, it is enough to read this one.
链表~~~
新库上线 | CnOpenData中国全部专利详细地址数据
TS2532: Object is possibly ‘undefined‘
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xff in position 0: invalid start byte
C#网络应用编程,实验2:IP地址转换和域名解析练习
Online Judge 输出超限
Sharepreference (storage)
Oracle +JDBC
System information function of MySQL function summary
[论文阅读] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation









