和与乘积.c 227 B

1234567891011121314
  1. #include <stdio.h>
  2. void value(int a, int b, int *s, int *p) {
  3. *s = a + b;
  4. *p = a * b;
  5. }
  6. int main() {
  7. int a, b, s, p;
  8. scanf("%d %d", &a, &b);
  9. value(a, b, &s, &p);
  10. printf("%d %d", s, p);
  11. return 0;
  12. }