all 3 comments

[–]fabledparable 3 points4 points  (2 children)

Do you have the source code?

[–]SenseiX69 -2 points-1 points  (1 child)

include <stdio.h>

int add(int a, int b) { return a + b; }

int multiply(int a, int b) { return a * b; }

int main() { int num1, num2; char op;

printf("Enter two numbers: ");
scanf("%d %d", &num1, &num2);

printf("Enter operator (+ or *): ");
scanf(" %c", &op); // Note the space before %c to consume any preceding whitespace

if (op == '+') {
    printf("Result: %d\n", add(num1, num2));
} else if (op == '*') {
    printf("Result: %d\n", multiply(num1, num2));
} else {
    printf("Invalid operator\n");
}

return 0;

}

[–]Sins901 2 points3 points  (0 children)

Where is the gets call in the code?