First thing is if you're going to read in an equation, then try an array of chars to avoid the pitfalls of user's inputting wrong data types, scan that array to get the values and the operation
Code:
printf("Enter the operation: ");
fgets(char_arr, sizeof(char_arr), stdin);
You know a few things... the first is you expect a number, then an operation, and another number. You can use functions like strchr to split the array as you require, or sscanf to parse the array according to the values that you expect.
functions are fairly easy.
Code:
int getProd(int, int); /*prototype */
.....
main
printf("enter a number: ");
scanf("%d", &num1);
printf("enter another number: ");
scanf("%d", &num2);
printf("%d * %d = %d", num1, num2, getProd(num1, num2));
end main
....
int getProd(int a, int b) /* definition */
{
return (a * b);
}