I am writing code to calculate GCD.
I use Visual Studio 2015
When I try to rebuild solution, it says it cannot open the program file.
Is it a problem with the code?
I really don't see where you are trying to open a file.
It really seems weird that your while loop is always true. Also, when your mod is zero it will break out of the while loop and completely miss the choice condition. Maybe it would be better to put that above the condition of mod != 0.
Why don't you want to make the condition of the while loop as mod != 0?