umm in my system the result is just fine.. i did 2 4 and gave choice 1 so addition result is 6...
well i have a quiestion is int result =x+y on line 8 is required??? wat i think is
33:: result = add(num1, num2); & 9:: return (x+y); does the job..
because our teacher said that some systems don't show the right answer but some like your system shows.
I question your teacher's C++ experience. Separate systems will/should not display different calculated results. It sounds like you're just having a problem keeping the console open. You have a call to system("PAUSE"); in case 0 that keeps it open, but nothing in case 1 which will result in the console window closing immediately. Read through this post for the appropriate solution http://www.cplusplus.com/forum/beginner/1988/. Also, you should always put a default case in your switch statement to catch the exceptions.