Create an application that allows the user to enter a telephonecustomer\'s name.
ID: 3615821 • Letter: C
Question
Create an application that allows the user to enter a telephonecustomer's name.
The application should lookup a telephone number based on the nameaccording to the following list:
Name
Phone number
Abula
Allen
Austin
Bailey
Balovich
Bates
Bettencourt
Blackburn
Boucher
Brown
Duncan
Estrada
Fernandez
Gallagher
Gonzales
Ha
Hernandez
Howard
Johnston
Nguyen
722-1379
685-3921
421-5534
555-1298
622-4649
650-2286
844-8936
288-3903
675-2376
356-4698
637-3150
637-5372
873-6368
721-8536
668-1985
390-9086
522-1192
590-1163
242-7821
633-1655
Each names and numbers should be stored in two parallel arrays.A sequential seach should be used to locate the name entered by theuser. If the user enters a name that is not in the array, theprogram should display a message indicating the name is not in thelist. If the user enters a name that is in the list, the programshould save the index (position) that the name was found in thenames array, and use that index to lookup the telephone number. Theprogram is to display both the name and the telephone number.
HINT:
Copy and paste the names from this page into your program. You willstill need to do some formatting such as quotation marks andcommas, but this will save you a lot of typing. Do the same thingfor the telephone numbers.
EXTRA CREDIT:
For extra credit, give the user the option of looking up thecustomer's name and finding the telephone number, or doing areverse directory search by asking for the telephone number andfinding the customer's name. The customer name lookup must workbefore doing the extra credit.
Name
Phone number
Abula
Allen
Austin
Bailey
Balovich
Bates
Bettencourt
Blackburn
Boucher
Brown
Duncan
Estrada
Fernandez
Gallagher
Gonzales
Ha
Hernandez
Howard
Johnston
Nguyen
722-1379
685-3921
421-5534
555-1298
622-4649
650-2286
844-8936
288-3903
675-2376
356-4698
637-3150
637-5372
873-6368
721-8536
668-1985
390-9086
522-1192
590-1163
242-7821
633-1655
Explanation / Answer
please rate - thanks #include #include using namespace std; int main() {int i,num=20; char name1[1][15],xxxs[5]="xxxx"; charname[20][15]={"Abula","Allen","Austin","Bailey","Balovich","Bates","Bettencourt", "Blackburn","Boucher","Brown","Duncan","Estrada","Fernandez", "Gallagher","Gonzales","Ha","Hernandez","Howard","Johnston","Nguyen"}; charphone[20][9]={"722-1379","685-3921","421-5534","555-1298","622-4649","650-2286", "844-8936","288-3903","675-2376","356-4698","637-3150","637-5372", "873-6368","721-8536","668-1985","390-9086","522-1192","590-1163", "242-7821","633-1655"}; coutname1[0]; while(strcmp(name1[0],xxxs)!=0) {for(i=0;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.