From 5d58df90a2baa900aada5d627eb5a5bfafec22b5 Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Mon, 5 Feb 2024 19:56:59 +0100 Subject: [PATCH] case 2 entry --- src/main/c/Calculator/calculator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/c/Calculator/calculator.c b/src/main/c/Calculator/calculator.c index 08943bd..3e4ed49 100644 --- a/src/main/c/Calculator/calculator.c +++ b/src/main/c/Calculator/calculator.c @@ -21,4 +21,9 @@ switch (choice) { result = add(num1, num2); printf("Result: %d\n", result); break; - \ No newline at end of file + case 2: + printf("Enter two numbers: "); + scanf("%d %d", &num1, &num2); + result = subtract(num1, num2); + printf("Result: %d\n", result); + break; \ No newline at end of file