1. uses Console.ReadLine() to read user input.
2. use simpler statement for if condition
2. use simpler statement for if condition
string message = (uservalue == "1") ? "boat" : "strand of lint";
//WriteLine() can use variable contains text to be print out {o} [appointing
message variable]
Console.WriteLine("you won = {0}", message);
//WriteLine can also be written by passing two variables
Console.WriteLine("you won= {0}", message, userValue);
Comments
Post a Comment