解题思路:
注意事项:
参考代码:import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int c=0;
int b=0,d=0;
int f=a;
int j;
while(a!=0) {
b=a/10;
a=b;
d++;
}
int t[]=new int [d];
System.out.println(d);
for(int i=0;i<d;i++) {
c=f%10;
f=f/10;
t[i]=c;
}
for(j=d-1;j>0;j--) {
System.out.print(t[j]+" ");
}
System.out.println(t[j]);
for(int i=0;i<d;i++) {
System.out.print(t[i]);
}
}
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题12.6 (C语言代码)浏览:794 |
矩形面积交 (Java代码)浏览:1221 |
【亲和数】 (C语言代码)浏览:859 |
计算质因子 (C++代码)浏览:1644 |
妹子杀手的故事 (C语言代码)浏览:1234 |
C语言程序设计教程(第三版)课后习题9.4 (C语言代码)浏览:667 |
Cylinder (C语言描述,蓝桥杯)浏览:1247 |
母牛的故事 (C语言代码)浏览:551 |
sizeof的大作用 (C语言代码)浏览:1451 |
Tom数 (C语言代码)浏览:495 |