解题思路:
注意事项:
参考代码:
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String num = scan.next();
int id = num.length();
System.out.println(id);
for(int i = 0;i < num.length();i++) {
if(i!=num.length() - 1) {
char num1 = num.charAt(i);
System.out.print(num1+" ");
}else {
char num2 = num.charAt(num.length() - 1);
System.out.print(num2);
}
}
System.out.println();
for(int i = (num.length() - 1);i >= 0;i--) {
char num3 = num.charAt(i);
System.out.print(num3);
}
}
}
0.0分
0 人评分