|
@ -14,4 +14,16 @@ int main() { |
|
|
displayMenu(); |
|
|
displayMenu(); |
|
|
printf("Enter your choice: "); |
|
|
printf("Enter your choice: "); |
|
|
scanf("%d", &choice); |
|
|
scanf("%d", &choice); |
|
|
switch (choice) { |
|
|
|
|
|
|
|
|
switch (choice) { |
|
|
|
|
|
case 1: |
|
|
|
|
|
printf("Enter two numbers: "); |
|
|
|
|
|
scanf("%d %d", &num1, &num2); |
|
|
|
|
|
result = add(num1, num2); |
|
|
|
|
|
printf("Result: %d\n", result); |
|
|
|
|
|
break; |
|
|
|
|
|
case 2: |
|
|
|
|
|
printf("Enter two numbers: "); |
|
|
|
|
|
scanf("%d %d", &num1, &num2); |
|
|
|
|
|
result = subtract(num1, num2); |
|
|
|
|
|
printf("Result: %d\n", result); |
|
|
|
|
|
break; |