Question
C PROGRAMING, structure the address book contains the following basic information: friend's name, date of birth, gender, phone number, mobile phone number. Write a program,
C PROGRAMING, structure the address book contains the following basic information: friend's name, date of birth, gender, phone number, mobile phone number. Write a program, input N records, and display any record as required.
[Input] Enter the positive integer N ( 10) given in line 1; Then N lines, each line gives a record in the format of "name, birthday, gender, fixed phone". Name is string with no more than 10 characters; The date of birth is given in the format of yyyy/mm/dd, Genders "M" and "F", "phone" and "mobile phone" are consecutive numbers with no more than 15 digits, and "+" may appear in front of them. After the entry of the address book record is completed, the last line gives a positive integer K, and then gives K integers, representing the record number to be queried (from 0 to N-1). The numbers are separated by spaces.
[Output] For each record number to be queried, output the record in one line in the format of "name, fixed phone gender, birthday". If the record to be queried does not exist, "Not Found" will be output.
[Example of input] 3 Chris 2001/03/10 M +75665487 13707010007 Linda 1996/11/01 F 82898840 +25148844 Dream 1999/08/01 M 45569799 5366 2 1 7 [Output example]
Linda 82898840 +25148844 F 1996/11/0 Not Found
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started