一个C语言问题 .将China译成密码 规律是用原来字母后的第4位字母替换原来的字母.我写的是#includevoid main(){char c1,c2,c3,c4,c5;printf("please input the word\"China\"\n");scanf("%c,%c,%c,%c,%c",c1,c2,c3,c4,c5);c1+=4;c2+
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/31 22:48:10
![一个C语言问题 .将China译成密码 规律是用原来字母后的第4位字母替换原来的字母.我写的是#includevoid main(){char c1,c2,c3,c4,c5;printf(](/uploads/image/z/8721812-20-2.jpg?t=%E4%B8%80%E4%B8%AAC%E8%AF%AD%E8%A8%80%E9%97%AE%E9%A2%98+.%E5%B0%86China%E8%AF%91%E6%88%90%E5%AF%86%E7%A0%81+%E8%A7%84%E5%BE%8B%E6%98%AF%E7%94%A8%E5%8E%9F%E6%9D%A5%E5%AD%97%E6%AF%8D%E5%90%8E%E7%9A%84%E7%AC%AC4%E4%BD%8D%E5%AD%97%E6%AF%8D%E6%9B%BF%E6%8D%A2%E5%8E%9F%E6%9D%A5%E7%9A%84%E5%AD%97%E6%AF%8D.%E6%88%91%E5%86%99%E7%9A%84%E6%98%AF%23includevoid+main%28%29%7Bchar+c1%2Cc2%2Cc3%2Cc4%2Cc5%3Bprintf%28%22please+input+the+word%5C%22China%5C%22%5Cn%22%29%3Bscanf%28%22%25c%2C%25c%2C%25c%2C%25c%2C%25c%22%2Cc1%2Cc2%2Cc3%2Cc4%2Cc5%29%3Bc1%2B%3D4%3Bc2%2B)
一个C语言问题 .将China译成密码 规律是用原来字母后的第4位字母替换原来的字母.我写的是#includevoid main(){char c1,c2,c3,c4,c5;printf("please input the word\"China\"\n");scanf("%c,%c,%c,%c,%c",c1,c2,c3,c4,c5);c1+=4;c2+
一个C语言问题 .将China译成密码 规律是用原来字母后的第4位字母替换原来的字母.
我写的是
#include
void main()
{
char c1,c2,c3,c4,c5;
printf("please input the word\"China\"\n");
scanf("%c,%c,%c,%c,%c",c1,c2,c3,c4,c5);
c1+=4;
c2+=4;
c3+=4;
c4+=4;
c5+=4;
printf("%c,%c,%c,%c,%c\n",c1,c2,c3,c4,c5);
}
如何把中间那些转成ASCII码然后输出来?= =
一个C语言问题 .将China译成密码 规律是用原来字母后的第4位字母替换原来的字母.我写的是#includevoid main(){char c1,c2,c3,c4,c5;printf("please input the word\"China\"\n");scanf("%c,%c,%c,%c,%c",c1,c2,c3,c4,c5);c1+=4;c2+
#include
void main()
{
char c1,c2,c3,c4,c5;
printf("please input the word\"China\"\n");
scanf("%c%c%c%c%c",&c1,&c2,&c3,&c4,&c5);
c1+=4;
c2+=4;
c3+=4;
c4+=4;
c5+=4;
printf("%c%c%c%c%c\n",c1,c2,c3,c4,c5);
}
这个没问题