1234567891011121314151617181920212223242526272829 |
- #include <stdio.h>
- int main() {
- int num, digit, count = 0;
-
- scanf("%d", &num);
-
- int temp = num;
-
- while (temp != 0) {
- digit = temp % 10;
- temp = temp / 10;
- count++;
- }
-
- printf("%d\n", count);
-
- printf("%d\n",num);
- while (num != 0) {
- digit = num % 10;
- printf("%d", digit);
- num = num / 10;
- }
- printf("\n");
-
-
- return 0;
- }
|