#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
char Change(char ch)
{
if(islower(ch))
{
if(ch == 'a' || ch == 'b' || ch == 'c')
return '2';
if(ch == 'd' || ch == 'e' || ch == 'f')
return '3';
if(ch == 'g' || ch == 'h' || ch == 'i')
return '4';
if(ch == 'j' || ch == 'k' || ch == 'l')
return '5';
if(ch == 'm' || ch == 'n' || ch == 'o')
return '6';
if(ch == 'p' || ch == 'q' || ch == 'r' || ch == 's')
return '7';
if(ch == 't' || ch == 'u' || ch == 'v')
return '8';
if(ch == 'w' || ch == 'x' || ch == 'y' || ch == 'z')
return '9';
}else if(isupper(ch))
{
if(ch == 'Z')
return 'a';
else
return ch + 33;
}
return ch;
}
int main()
{
int i;
char password[101];
while(gets(password) != NULL)
{
i=0;
while(password[i] != '\0')
{
printf("%c",Change(password[i]));
i++;
}
printf("\n");
}
return 0;
}
0.0分
1 人评分
C二级辅导-求偶数和 (C语言代码)浏览:577 |
C二级辅导-公约公倍 (C语言代码)浏览:2091 |
震宇大神的杀毒软件 (C++代码)浏览:1043 |
简单的a+b (C语言代码)浏览:743 |
C语言程序设计教程(第三版)课后习题9.6 (C语言代码)浏览:268 |
C语言程序设计教程(第三版)课后习题1.5 (C++代码)浏览:742 |
求圆的面积 (C语言代码)浏览:1075 |
C语言程序设计教程(第三版)课后习题11.8 (C语言代码)浏览:836 |
WU-陶陶摘苹果2 (C++代码)浏览:939 |
A+B for Input-Output Practice (VII) (C语言代码)浏览:509 |