Kaye
3
Q:

how to make an input in c#

// Type your username and press enter
Console.WriteLine("Enter username:");

// Create a string variable and get user input from the keyboard and store it in the variable
string userName = Console.ReadLine();

// Print the value of the variable (userName), which will display the input value
Console.WriteLine("Username is: " + userName);
12
string myName;

Console.WriteLine("Please, enter your full name here: ");
myName = Console.ReadLine();
Console.WriteLine("Hello, Mr. " + myName + "!");

Console.Key();

/* OR */

Console.WriteLine("Please, enter your full name: ");
string myName = Console.ReadLine();
Console.WriteLine("Hello, Mr. " + myName + "!");

Console.ReadKey();
1
Console.Write("words");
input = Console.ReadLine();
7

New to Communities?

Join the community