整数合并.c 262 B

12345678910111213141516
  1. #include <stdio.h>
  2. void comb(int a, int b, int *c) {
  3. *c = (a % 10) * 1000 + (b / 10) * 1 + (a / 10) * 10 + b % 10*100;
  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. }