D
Deleted member 613
Guest
To do this you will need the command: Console.ReadLine();
Follow these steps:
1: Create a string(for a word input) or an int (for a number input).
Then add '= Console.ReadLine();'
This will take in what the user types and stores it in the variables...
...BUT,If you use this for a int, there will be an error because it can't convert.To fix this, do this:
And thats it!
Follow these steps:
1: Create a string(for a word input) or an int (for a number input).
C#:
string word =
C#:
int num =
C#:
string word = Console.ReadLine();
C#:
int num = Console.ReadLine();
...BUT,If you use this for a int, there will be an error because it can't convert.To fix this, do this:
C#:
int num = int.Parse(Console.ReadLine());
And thats it!