Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<math.h>
- // All arithmetic operators
- int main()
- {
- int a,b,result;
- printf(" Enter the value of a and b : \n");
- scanf(" %d %d",&a,&b);
- result = a+b;
- printf("a+b = %d \n",result);
- result = a-b;
- printf("a-b = %d \n",result);
- result = a*b;
- printf("a*b = %d \n",result);
- result= a/b;
- printf("a/b = %d \n",result);
- result= a%b;
- printf("Remainder when a divided by b = %d \n",result);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement