netx_iit

Use of arithmetic operator

Jul 29th, 2020 (edited)
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. /* Use of arithmetic operator */
  2. #include<stdio.h>
  3. #include<conio.h>
  4. int main()
  5. {
  6.     int a,b,ans;
  7.     printf("\nEnter two number:");
  8.     scanf("%d %d",&a,&b);
  9.     ans=a+b;
  10.     printf("\n Addition of two number is %d",ans);
  11.     ans=a-b;
  12.     printf("\n Subtraction of two number is %d",ans);
  13.     ans=a*b;
  14.     printf("\n Multiplication of two number is %d",ans);
  15.     ans=a/b;
  16.     printf("\n Division of two number is %d",ans);
  17.     ans=a%b;
  18.     printf("\n Module of two number is %d",ans);
  19.     return 0;
  20. }
Add Comment
Please, Sign In to add comment