fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char a, b, c, d, e;
  5. printf("Size of datatype is %zu byte(s)\n", sizeof(char));
  6.  
  7. printf("\nStep by step:\n");
  8. a = 118;
  9. b = 25;
  10. c = a + b;
  11. printf("%d + %d = %d\n", a, b, c);
  12. d = 63;
  13. e = c - d;
  14. printf("%d - %d = %d\n", c, d, e);
  15. printf("At once:\n");
  16. e = a + b - d;
  17. printf("%d + %d - %d = %d\n", a, b, d, e);
  18.  
  19. printf("\nStep by step:\n");
  20. a = 58;
  21. b = 3;
  22. c = a * b;
  23. printf("%d * %d = %d\n", a, b, c);
  24. d = 101;
  25. e = c - d;
  26. printf("%d - %d = %d\n", c, d, e);
  27. printf("At once:\n");
  28. e = a * b - d;
  29. printf("%d * %d - %d = %d\n", a, b, d, e);
  30.  
  31. return 0;
  32. }
  33.  
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
Size of datatype is 1 byte(s)

Step by step:
118 + 25 = -113
-113 - 63 = 80
At once:
118 + 25 - 63 = 80

Step by step:
58 * 3 = -82
-82 - 101 = 73
At once:
58 * 3 - 101 = 73