Newbie here!!!!
I just started taking C++ in college and I know this is C++ basic, but trying to wrap my head around it.
We are to create a program (basically scheduling appointment by phone) asking to input 1, 2 or 3 (which is an office location), then it will ask for an appointment type (1, 2, 3, or 4). Once this is completed, it will show the proper message(12 different options) e.g.
Office location:
Press 1 for Syracuse office
Press 2 for Albany office
Press 3 for Rochester office
(once the above is selected)
Press 1 new appointment
Press 2 reschedule appointment
Press 3 Billing
Press 4 Talk to nurse
after these have been selected, (you now can see the 12 different messages that can be shown) and should show the following:
e.g. you pressed 2 for office and then pressed 3 for billing, Message should show
Rochester: billing question
This has to be done using the Swith form and or the else/if, or else if!
Any input would greatly be appreciated,
Bill
I have the following:
Code:
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
//Declare variables
int officeNumber = 0;
int selectionNumber = 0;
//Input data
cout << "Enter office number." << endl;
cout << "Press 1 for Syracuse office " << endl;
cout << "Press 2 for Albany office " << endl;
cout << "Press 3 for Rochester office " << endl;
cin >> officeNumber;
cout << "Enter selection number." << endl;
cout << "Press 1 for making new appointment" << endl;
cout << "Press 2 for rescheduling an appointment" << endl;
cout << "Press 3 for billing questions" << endl;
cout << "Press 4 for talking to a nurse" << endl;
cin >> selectionNumber;
//Begin SWITCH & Display selection
switch (selectionNumber)
{
case 1: cout << "?????: " << endl;
break;
case 2: cout << "?????: " << endl;
break;
case 3: cout << "?????: " << endl;
break;
default: cout << "INPUT ERROR" << endl;
}//End SWITCH
system("pause");
return 0;
}