kucheasysa

arith op

Jun 6th, 2023 (edited)
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | Source Code | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a, b, c;
  5. printf("Enter the first number: ");
  6. scanf("%d", &a);
  7.  
  8. printf("Enter the second number: ");
  9. scanf("%d", &b);
  10.  
  11. c = a+b;
  12. printf("a+b = %d \n",c);
  13. c = a-b;
  14. printf("a-b = %d \n",c);
  15. c = a*b;
  16. printf("a*b = %d \n",c);
  17. c = a/b;
  18. printf("a/b = %d \n",c);
  19. c = a%b;
  20. printf("Remainder when a divided by b = %d \n",c);
  21.  
  22. return 0;
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment