如何输入并输出字符串?
#include<stdio.h>
void main(){
char word,shu;
printf("请输入字符串:\t");
scanf("%c",&word);
if(word>='a'&&word<'w'||word>='A'&&word<'W')
shu=word+4;
if(word>='w'&&word<='z'||word>='W'&&word<='Z')
shu=word-22;
printf("%c\n",shu);
}
#include<stdio.h>
void main(){
char word,shu;
printf("请输入字符串:\t");
scanf("%c",&word);
if(word>='a'&&word<'w'||word>='A'&&word<'W')
shu=word+4;
if(word>='w'&&word<='z'||word>='W'&&word<='Z')
shu=word-22;
printf("%c\n",shu);
}
举报