你想我吗?
作者:互联网
package com.Jing.struct;
import java.util.Scanner;
public class ILU2 {
public static void main(String[] args) {
int[] he = {120,105,97,110,103,32,119,111,32,108,101,32,109,97,94,95,94};
int[] xu = {87,111,32,121,101,32,120,105,97,110,103,32,110,105,32,108,101,94,95,94};
int[] ha = {78,97,32,104,97,111,32,98,97,92,95,92};
for (int j : he) {
System.out.print((char) j);
}
System.out.println();
System.out.println("请输入yes或者no");
Scanner scanner = new Scanner(System.in);
String a = scanner.nextLine();
switch (a) {
case "yes":
for (int x : xu) {
System.out.print((char) x);
}
return;
case "no":
for (int l : ha) {
System.out.print((char) l);
}
return;
default:
System.out.println("输入无效");
}
}
}
标签:,int,32,System,94,97,out 来源: https://www.cnblogs.com/jinghaha/p/15528150.html