fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a, b, c, d, result[3];
  5.  
  6. for (int i = 0; i < 3; i++) {
  7. scanf(" (%d+%d)x(%d-%d)", &a, &b, &c, &d);
  8. // ^ <----------------------------------- space added here
  9. result[i] = (a + b) * (c - d);
  10. }
  11. printf("%d %d %d\n", result[0], result[1], result[2]);
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0s 5456KB
stdin
(3+4)x(1-3)
(8+3)x(5-4)
(4+12)x(11-9)
stdout
-14 11 32