26 lines
606 B
C#
26 lines
606 B
C#
|
// See https://aka.ms/new-console-template for more information
|
|||
|
/*
|
|||
|
string stringNumber = "40";
|
|||
|
|
|||
|
Console.WriteLine("stringNumber is a " + stringNumber.GetType() + ", its value is " + stringNumber);
|
|||
|
|
|||
|
int stringInt = int.Parse(stringNumber);
|
|||
|
|
|||
|
Console.WriteLine("stringInt is a " + stringInt.GetType() + ", its value is " + stringInt);
|
|||
|
*/
|
|||
|
|
|||
|
string input;
|
|||
|
List<string> inputList = new List<string>();
|
|||
|
int i = 0;
|
|||
|
while (i != 5) {
|
|||
|
Console.Write("Enter a string: ");
|
|||
|
input = Console.ReadLine();
|
|||
|
inputList.Add(input);
|
|||
|
i++;
|
|||
|
}
|
|||
|
i = 0;
|
|||
|
while (i != 5) {
|
|||
|
Console.WriteLine(inputList[i]);
|
|||
|
i++;
|
|||
|
}
|