#include
#include
void main()
{ char c1='C',c2='h',c3='i',c4='n',c5='a';
c1=c1+4;
c2=c2+4;
c3=c3+4;
c4=c4+4;
c5=c5+4;
printf("%c%c%c%c%c",c1,c2,c3,c4,c5);}。
手上没截图,就文字表示了,按这个操作就可以的。
1、编程序是指在利用电子计算机自动处理问题,人们根据自己对信息处理的要求,给电子计算机设计指令。Tiny BASIC,由Bob Albrecht和Dennis Allison设计(由Dick Whipple和John Arnold实现),运行在2KB内存的微型计算机上。一台4KB的机器是较为合适的,它将有2KB的内存应用于这个程序上。
2、Bill Gates和Paul Allen编写的一个BASIC版本以抽取每份拷贝版税的形式销售给MITS(Micro Instrumentation and Telemetry Systems)。MITS生产Altair,这是一种8080结构的微型计算机。Scheme,一个LISP的"方言",由G.L. Steele和G.J. Sussman设计。Pascal用户手册和报告出版,Jensen和Wirth编写。许多人至今都认为它是Pascal方面权威的参考书籍。B.W. Kerninghan描述了RATFOR--RATional FORTRAN。
程序怎么发给你呢?W/X/Y/Z转换成什么字母呢?
string[] arry1 = new string[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l",
"m","n","o","p","q","r","s","t","u","v","w","x","y","z","A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L",
"M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
string[] arry2 = new string[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L",
"M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
Listlist = new List ();
private void button1_Click(object sender, EventArgs e)
{
string str_in = textBox1.Text.Trim().ToString();
if (!check(str_in))
{
MessageBox.Show("输入的字符串不准确,请输入字母类型!");
return;
}
transfer(str_in);
string str_out = string.Join("", list.ToArray());
list.Clear();
textBox2.Text = str_out;
}
///
/// 转换
///
/// 输入字符串
private void transfer(string input)
{
if (input.Length < 1)
{
MessageBox.Show("字符串长度小于1,转换失败!");
return;
}
for (int i = 0; i < input.Length; i++)
{
string getChar = input.Substring(i,1);//获取当前遍历的字符
int index = Array.IndexOf(arry1,getChar);
list.Add(arry1[index+4].ToString());
}
}
///
/// 验证字符串是否为字母
///
///
///
private bool check(string in_string)
{
Regex regex_1 = new Regex("^[A-Za-z]+$");
if (regex_1.IsMatch(in_string))
{
return true;
}
else
return false;
}
从键盘上任意输入5个字符,用原来字母后面第4个字母代替原来的字母。要考虑如超过“Z”和"z",则环绕至“A”和“a"后。
#include
int main()
{
char c1,c2,c3,c4,c5;
scanf("%c%c%c%c%c",&c1,&c2,&c3,&c4,&c5);
if((c1+4>'z')||((c1+4>'Z')&&(c1<96)))
c1=c1-25;
else
c1=c1+4;
if((c2+4>'z')||((c2+4>'Z')&&(c2<96)))
c2=c2-25;
else
c2=c2+4;
if((c3+4>'z')||((c3+4>'Z')&&(c3<96)))
c3=c3-25;
else
c3=c3+4;
if((c4+4>'z')||((c4+4>'Z')&&(c4<96)))
c4=c4-25;
else
c4=c4+4;
if((c5+4>'z')||((c5+4>'Z')&&(c5<96)))
c5=c5-25;
else
c5=c5+4;
printf("password is %c%c%c%c%c\n",c1,c2,c3,c4,c5);
return 0;
}
#include
#include
void main()
{
char c1='C',c2='h',c3='i',c4='n',c5='a';
c1=c1+4;
c2=c2+4;
c3=c3+4;
c4=c4+4;
c5=c5+4;
printf("%c%c%c%c%c",c1,c2,c3,c4,c5);
}
#include
char cl,c2, c3,c4, c5:cl='G' ;c2='l';c3='m' ;c4='r';c5='e';cl-=4;c2-=4;c3-=4:c4-=4:c5-=4:
printf ("ic,sc, sc, c, sc",cl, c2,c3,c4,c5) ;