整数合并.c 267 B

123456789101112131415
  1. #include <stdio.h>
  2. void comb(int a, int b, int *c) {
  3. *c = 10 * (a / 10 % 10) + 1000 * (a % 10) + b / 10 % 10 + 100 * (b % 10);;
  4. }
  5. int main() {
  6. int a, b, result;
  7. scanf("%d %d", &a, &b);
  8. comb(a, b, &result);
  9. printf("%d\n", result);
  10. return 0;
  11. }