The program looks so much better. Few more tips:
When someone divides by 0, instead of exiting the program, prompt them to re-enter the second number
I noticed you changed
num1num2toint. If someone inputs a number with decimals, the program misbehaves. It's probably best to leave the variables asfloat.You now also have a nested
if-elseloop instead ofswitch (case). I don't know how I feel about that. It probably doesn't matter, and people may disagree, but I'd go back toswitch (case). It just looks neater and I find it to be the go-to way to work menus.If someone enters wrong values for
choice, the program still prompts the user fornum1andnum2, then printsEnter correct number! Exiting program.If you had aswitch (case)menu, you could add adefaultcase that would automatically tell the user that thechoiceis incorrect and they need to pick a valid optionYou should stick with
int main(void)in C. See: http://stackoverflow.com/a/12225214/4907651https://stackoverflow.com/a/12225214/4907651You should keep
return 0for good practiceToo much (useless) commenting. You don't need to add a comment stating when the main starts or what the function does unless it's not obvious.
I do like how when you exit the program, you have exit(0) for when it exits by user command (successful execution), and exit(1) for when there is an error.