Hello, I have a question. I have started programming with a simple console application, a calculator.
This all works very well, but I have a problem with the if query if I want to restart the console (recalculate) or exit.
I'm looking for days on the Internet for a solution, unfortunately I can not find anything.
Therefore I would like to try it here whether vllt someone could help me to solve this problem.
Thanks in advance!
This is my code, but the lower part is missing, which I don't know...
Thank you in advance, I am a beginner so please understand that even such a simple thing is hard for me.
LG Andre
This all works very well, but I have a problem with the if query if I want to restart the console (recalculate) or exit.
I'm looking for days on the Internet for a solution, unfortunately I can not find anything.
Therefore I would like to try it here whether vllt someone could help me to solve this problem.
Thanks in advance!
This is my code, but the lower part is missing, which I don't know...
C#:
Console.WriteLine("Do you want to start a recalculation or exit the program?");
Console.ReadLine();
char input;
if (input == 'J' || input == 'j')
{
//code
}
if (input == 'N' || input == 'n')
{
//code
}
Thank you in advance, I am a beginner so please understand that even such a simple thing is hard for me.
LG Andre
Last edited by a moderator: