fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a, b;
  6. int sum = 0, sub = 0, mul = 0;
  7.  
  8. printf("Please enter the two values:");
  9.  
  10. /* Read input */
  11. scanf("%d%d", &a, &b);
  12. sum = a+b;
  13. sub = a-b;
  14. mul = a*b;
  15.  
  16. /* Print output */
  17. printf("The sum = %d \nsub = %d \nmul = %d", sum, sub, mul);
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 5316KB
stdin
14
12
stdout
Please enter the two values:The sum = 26 
sub = 2 
mul = 168