why when i test this the result is 1 when i wrote 1
#include <iostream> using namespace std; class elevator { private: int elevator_loc; public: void initdata() { cout << "\n Enter the floor you on it: "; cin >> elevator_loc; cout << "Elevator is now on floor " << elevator_loc; } void move_up() { elevator_loc = elevator_loc + 3; } void move_down() { --elevator_loc; } void displaydata() { cout << "\nYou are now on floor:" << elevator_loc; } }; void main() { char choice = 'q'; elevator elev1; elev1.initdata(); while (choice != 'q') { cout << "\n Enter + to go up, Enter - to go down, q to quit"; cin >> choice; if (choice == '+') { cout << "You will move up"; elev1.move_up(); } if (choice == '-') { cout << "You will move down"; elev1.move_down(); } } elev1.displaydata(); }