Example #1
0
        static void Main(string[] args)
        {
            Elevator elevator = new Elevator();

            elevator.Floor = 1;
            do
            {
                Console.WriteLine("Elevator is now in floor: " + elevator.Floor);
                Console.Write("Give a new floor number (1-5): ");
                string rivi = Console.ReadLine();
                elevator.Floor = int.Parse(rivi);
            } while (elevator.Floor != 0);
        }
        static void Main(string[] args)
        {
            Elevator elevator = new Elevator();
            elevator.Floor = 1;
            int num;

            for (int i = 0; i < ; i++)
            {
                Console.WriteLine("You are currentyly in the " +elevator.Floor + " floor, give a floor number you wish to enter: ");
                elevator.Floor = int.Parse(Console.ReadLine());
            }
            
              
        }