Advertisement
anhkiet2507

Untitled

Apr 8th, 2021
2,291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int a ,b;
  5.     float c;
  6.     scanf("%d", &a);
  7.     scanf("%d", &b);
  8.     printf("%d", a + b);   
  9.     printf("\n%d", a - b);
  10.     printf("\n%d", a * b);
  11.     printf("\n%d", a / b);
  12.     printf("\n%d", a % b);
  13.     c = (float)a / (float)b;
  14.     printf("\n%.2f", c);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement