r/CodingHelp • u/[deleted] • Mar 08 '20
[C#] Why isn’t my stuff showing up in the console?
2
u/Famous_Profile Professional Coder Mar 08 '20
What happens? What is the error? Try switching lines 12 and 13 and remove line 14
2
2
u/KTthemajicgoat Mar 09 '20
While others have solved the issue, try using and else if statement instead of 2 ifs. Once you have more if statements it will get confusing to figure out which one does what
1
1
u/lightlysaltedStev Mar 09 '20
Ahh I LOVE seeing posts like this ! I came to this group to give new people some help with their first programs and stuff but every group I’ve joined it feels like everyone uploads huge programs that I can’t be bothered to go through and work out 😂😂 want more posts like this where you can just glance up and down and work out the problem ! I’ve seen you’ve figured it out now though op 👏🏻🙌🏻🙌🏻
1
u/ZacC15 Intermediate Coder Mar 09 '20
You haven't tied anything to Console.ReadLine(). Try int userInput = int.Parse(Console.ReadLine());
4
u/Boris-Holo Mar 08 '20
you are grtting user input before writing to the console, so the console waits until you enter something before it showa the text you want.