int main() { NumDays *days = new NumDays(); double hours; cout << "Enter numberof hours worked and get working days.\n"; cout<< "Enter 0 to terminate the sequence. \n"; while (true) { cout << "Enter number of hours" << endl; cin >> hours; if (hours < 0) { cout << "Invalid input. Please try again." << endl; continue; } if (hours == 0) { cout << "Exiting..." <<endl; break; } days->setWorkingHours(hours); cout << hours << " working hours is " << days->getDays() << " working days." << endl;
NumDays
NumDays days;
days
days->setWorkingHours(hours);
days.setWorkingHours(hours);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)