手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

编写一个程序,要求输入一个ASCII码值,然后输出相应的字符.

时间:2024-10-13 05:02:21

java程序:

public class test {

public static void m锾攒揉敫ain(String[] args) {

Scanner input = new Scanner(System.in);

char a;

String b = null;

while(1==1) {

System.out.println("请输入一个字符:");

b = input.next();

if(b.equals("exit")) break;

a=b.charAt(0);

System.out.println("ASCII:"+(int)a);

}

}

}

效果如图所示:

编写一个程序,要求输入一个ASCII码值,然后输出相应的字符.

© 手抄报圈