Browse Source

case 2 entry

remotes/origin/Ulrich
Ulriche Nguefack 11 months ago
parent
commit
5d58df90a2
  1. 7
      src/main/c/Calculator/calculator.c

7
src/main/c/Calculator/calculator.c

@ -21,4 +21,9 @@ switch (choice) {
result = add(num1, num2); result = add(num1, num2);
printf("Result: %d\n", result); printf("Result: %d\n", result);
break; break;
case 2:
printf("Enter two numbers: ");
scanf("%d %d", &num1, &num2);
result = subtract(num1, num2);
printf("Result: %d\n", result);
break;
Loading…
Cancel
Save