Keep asking the input until the valid input is written

PHOTO EMBED

Sun Dec 12 2021 07:45:54 GMT+0000 (Coordinated Universal Time)

Saved by @abzal_nurgazy #c++

while (startTime<0 || startTime>2400) {

            cout << "\nInvalid time.";          // keep asking for time input until it is valid
            cout << "Enter start time of the call(For example, 2:30 = 2330): ";
            cin >> startTime;
        }
content_copyCOPY