解题思路:
注意事项:
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int t = n;
int count = 0;
int[] array = new int[5];
while(n%10 != 0){
array[count] = n%10;
count++;
n /= 10;
}
System.out.println(count);
for(int i=4;i>=0;i--){
System.out.print(array[i]+" ");
}
System.out.println();
while(t%10 != 0){
System.out.print(t%10);
t /= 10;
}
}
}
参考代码:
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题10.5 (C语言代码)浏览:552 |
C语言程序设计教程(第三版)课后习题5.5 (C语言代码)浏览:668 |
剪刀石头布 (C语言代码)浏览:752 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:615 |
完数 (C语言代码)浏览:693 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:676 |
1124题解浏览:595 |
C语言程序设计教程(第三版)课后习题6.7 (C语言代码)浏览:682 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:470 |
简单的a+b (C语言代码)浏览:460 |