diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index d92a7be..c02f69f 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -32,4 +32,14 @@ switch (choice) { scanf("%d %d", &num1, &num2); result = multiply(num1, num2); printf("Result: %d\n", result); + break; + case 4: + printf("Enter two numbers: "); + scanf("%d %d", &num1, &num2); + if (num2 == 0) { + printf("Error: Division by zero\n"); + } else { + result = divide(num1, num2); + printf("Result: %d\n", result); + } break; \ No newline at end of file