#include #include #include using namespace std; float getFloat(string prompt) { char input[8]; float f; cout << endl << prompt; cin >> input; f = (float)atof(input); return f; } string getString(string prompt) { string s; cout << endl << prompt; getline(cin, s); return s; } int getInt(const string & prompt) { int i; cout << endl <> i; return i; } //create appointment struct struct appointment { string description; float date; int duration; string name; }; const int limit= 100; appointment appointments[limit]; int usedup=0; int current=0; appointment getAppointment() { appointment a; a.name= getString("Please enter who the appointment is with: "); a.description= getString("Enter a description for this appointment: "); a.date= getFloat("Enter The date of the appointment (DD.MM): "); a.duration= getInt("Please enter how long the appointment will take, in hours: "); usedup++; cout<< endl<<"Thank you, entry with appointmentID # " << usedup <<" added" <> selection; cin.ignore(); switch (selection){ case 1: getAppointment(); break; case 2: cout <<"Please enter which date the appointment is (DD.MM): "; cin>> appdate; showAppDate(appdate); break; } while (selection< 6); };