4 条题解
- 1
信息
- ID
- 3492
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- 递交数
- 46
- 已通过
- 20
- 上传者
这题很简单,while循环保证AC:
#include <iostream>
using namespace std;
int main(){
int n,shuwei;
cin >> n;
while(n){
shuwei = n % 10;
n /= 10;
cout << shuwei << " ";
}
return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ int m; cin>>m; while(m!=0){ cout<<m%10<<" "; m=m/10; } return 0; }
#include<bits/stdc++.h> using namespace std ; int main ( ) { int m ; cin >> m ; while ( m != 0 ) { cout << m % 10 << " " ; m = m / 10 ; } return 0 ; }