fork download
  1. #include<stdio.h>
  2. int main() {
  3. int a,b,sum,diff,q,p;
  4. scanf("%d",&a);
  5. scanf("%d",&b);
  6. sum = a+b;
  7. diff=a-b;
  8. q=a/b;
  9. p=a*b;
  10. printf("sum of a and b = %d\n", sum);
  11. printf("difference of a and b = %d\n",diff);
  12. printf("product of a and b = %d\n",p);
  13. printf("quotient of a and b = %d\n",q);
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5284KB
stdin
20 40
stdout
sum of a and b = 60
difference of a and b = -20
product of a and b = 800
quotient of a and b = 0