I have literally started c# today and I have hit a block.
I am following beginner guides on YouTube but I have not found my answer yet.
What I am trying to get is the question below, all on the same line:
"what is * divided by *"
but what I am getting is:
what is * (here at this point I press Return to confirm the digits which I think is my problem)
divided by * (really here is the only place I want to be hitting return)
Start:
int num03;
int num04;
int answer;
Console.Write ("what is ");
num03 = Convert.ToInt32 (Console.ReadLine ());
Console.Write ("divided by ");
num04 = Convert.ToInt32 (Console.ReadLine ());
Console.WriteLine ("");
Console.WriteLine ("is the answer? ");
answer = Convert.ToInt32 (Console.ReadLine());
if (num03 / num04 < answer) {
Console.WriteLine ("a bit lower next time");
Console.WriteLine ("");
Console.WriteLine ("");
goto Start;
} else if ( num03 / num04 > answer ) {
Console.WriteLine ("a bit higher next time");
Console.WriteLine ("");
Console.WriteLine ("");
goto Start;
} else if ( num03 / num04 == answer ) ; {
Console.WriteLine ("correct!!! please try another");
Console.WriteLine ("");
Console.WriteLine ("");
}
goto Start;
I think the hardest part is trying to search the correct phrase for help when I get stuck.