You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int a = 123;
|
|
int ans = 0;
|
|
while (a) {
|
|
ans = ans * 10 + a % 10;
|
|
a /= 10;
|
|
}
|
|
printf("%d", ans);
|
|
|
|
// //数位分离办法
|
|
// while (a) {
|
|
// int b = a % 10;
|
|
// a /= 10;
|
|
// printf("%d", b);
|
|
// }
|
|
// printf("\n");
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
} |