the code i need is to print out the numbers when i input from where....to where!! ....noob here
- public static void Main(string[] args)
- {
- List<int> list = new List<int>();
- while (true)
- {
- int input = Convert.ToInt32(Console.ReadLine());
- if (input == -1)
- {
- break;
- }
- list.Add(input);
- }
- Console.WriteLine("From where");
- int number = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("To where");
- int number2 = Convert.ToInt32(Console.ReadLine());
- for (int i = 0; i < list.Count; i++)
- Console.WriteLine(i);