Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int a, b, add, subtract, multiply;
- float divide;
- printf("Enter two integers\n");
- scanf("%d%d", &a, &b);
- add = a + b;
- subtract = a - b;
- multiply = a * b;
- divide = a / (float)b; //typecasting
- printf("Sum = %d\n", add);
- printf("Difference = %d\n", subtract);
- printf("Multiplication = %d\n", multiply);
- printf("Division = %.2f\n", divide);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement