Most likely you are dividing by zero. The divide
variable is set before the 'if' and you perform that operation anyway. Put that inside the first 'if', so it will divide by the num2
iff num2
is different than zero.
Edit: It should look like that:
if (num2 != 0) {
divide = something / num2;
printf("\nInput 3 / Input 2 (int) %12d", divide);
}