c语言吗?下面是程序:#include <stdio.h>int main(){ char x,y,z; scanf ("%c %c %c",&x,&y,&z); x=x+3; y=y+3; z=z+3; printf ("%c%c%c",x,y,z); return 0;}下面是运行结果图:还有问题吗,谢谢采纳,Thanks♪(・ω・)ノ
import java.util.Scanner;class Test{public static void main(String[] args){Scanner item=new Scanner(System.in);System.out.println("输入3个小写字母");String str=item.next();String strs="";for(int x=0;x<str.length();x++){char tem= str.charAt(x);if(tem=='x'){strs+='a';}else if(tem=='y'){strs+='b';}else if(tem=='z'){strs+='c';}else{strs+=(char)(tem+3);}}System.out.println(strs);}}
//请不要在意注释,这是因为360说不能重复提交相似内容//请不要在意注释,这是因为360说不能重复提交相似内容//请不要在意注释,这是因为360说不能重复提交相似内容//请不要在意注释,这是因为360说不能重复提交相似内容#include <stdio.h>int main(){char a[4]={0};for(int i=0;i<3;++i){scanf("%c",&a[i]);a[i]+=3;}printf("%s",a);}
4 个回答
浅安时光
赞同来自 :
c语言吗?
下面是程序:
#include <stdio.h>
int main()
{
char x,y,z;
scanf ("%c %c %c",&x,&y,&z);
x=x+3;
y=y+3;
z=z+3;
printf ("%c%c%c",x,y,z);
return 0;
}
下面是运行结果图:
还有问题吗,谢谢采纳,Thanks♪(・ω・)ノ
越努力越认真
赞同来自 :
酷并且帅
赞同来自 :
//请不要在意注释,这是因为360说不能重复提交相似内容
//请不要在意注释,这是因为360说不能重复提交相似内容
//请不要在意注释,这是因为360说不能重复提交相似内容
//请不要在意注释,这是因为360说不能重复提交相似内容
#include <stdio.h>
int main(){
char a[4]={0};
for(int i=0;i<3;++i){
scanf("%c",&a[i]);
a[i]+=3;
}
printf("%s",a);
}
相遇
赞同来自 :
2313131313132
提问者
威望
粉丝
感谢
积分
赞同
提问
文章
回复
私信 问Ta
关注问题人数 5 人
相关问题