Advertisement
Nabil-Ahmed

Untitled

Jun 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. //All arithmetic operations(+,-,*,/,%)//
  2. #include<stdio.h>
  3. int main()
  4. {
  5.  int a,b,add,sub,mul,div,rem;
  6.  printf("Enter two number:");
  7.  scanf("%d %d",&a,&b);
  8.  
  9.  add=a+b;
  10.  sub=a-b;
  11.  mul=a*b;
  12.  div=a/b;
  13.  rem=a%b;
  14.  
  15.  printf("Addition is %d\n",add);
  16.  printf("Subtraction is %d\n",sub);
  17.  printf("Multiplication is %d\n",mul);
  18.  printf("Division is %d\n",div);
  19.  printf("Reminder is %d\n",rem);
  20.  
  21.  return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement