Advertisement
Niloy007

Abir 1

Jul 4th, 2021
953
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.  
  3. int main() {
  4.     int numOne, numTwo;
  5.     printf("Enter two number\n");
  6.     scanf("%d %d", &numOne, &numTwo);
  7.  
  8.     printf("Addition: %d\n", numOne + numTwo);
  9.     printf("Subtraction: %d\n", numOne - numTwo);
  10.     printf("Multiplication: %d\n", numOne * numTwo);
  11.     if (numTwo == 0) {
  12.         printf("Divide by zero is not possible!!\n");
  13.     } else {
  14.         printf("Division: %.2lf\n", (numOne * 1.0) / numTwo);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement