Advertisement
samrina_sarkar_7

All Arithmatic operation

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