Answer to Question #26619 in C# for Dave

Question #26619
How could i add to this code in order to make a menu where i press a number and it goes onto the next part for example: 1 - Browse Auction 2 - List Auction 3 - Listed Auctions 4 - Exit class Program { static void Main(string[] args) { string input; Console.WriteLine("Please enter a username"); input = Console.ReadLine(); if (input == "John") if (input != "John") error(); Console.WriteLine("Please enter a password"); input = Console.ReadLine(); if (input == "Smith") menu(); if (input != "Smith") error(); } static void menu() { Console.WriteLine("Welcome!"); Console.ReadLine(); } static void error() { Console.WriteLine("error"); } } }
0
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS