You should learn to use the debugger as soon as possible. Rather than guessing what your code is doing, It is time to see your code executing and ensuring that it does what you expect.
The debugger allow you to follow the execution line by line, inspect variables and you will see that there is a point where it stop doing what you expect.
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[
^]
http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html[
^]
https://www.jetbrains.com/idea/help/debugging-your-first-java-application.html[
^]
Your code
switch (answear)
{
case 'Y':
{
goto PAR2;
}
case 'y':
{
goto PAR2;
}
case 'N':
{
exit(1);
}
case 'n':
{
exit(1);
}
default:
{
printf("Not an option. Answear only with Y/N!\n");
goto PAR3;
}
}
can be simplifyed
switch (answear)
{
case 'Y':
case 'y':
{
goto PAR2;
}
case 'N':
case 'n':
{
exit(1);
}
default:
{
printf("Not an option. Answear only with Y/N!\n");
goto PAR3;
}
}
Using
labels
and
gotos
is a bad habit and should be avoided at all cost. They should be reserved to special cases and where speed is considered.