Please write a program that will be run by a father/mother who has three children, where obviously each one of them has a unique first name and no twins; i.e. each child has a different age. Prompt the user to enter the first names of their three children along with their respective ages.
Your task is to display the children info sorted out by either name or age. You will ask the user as well to enter the sorting order, asc or desc, for ascending or descending, for names and for ages.
Default sorting order is asc for names and desc for ages. The user can choose any order for any category (age or name).
Sample Output 1:
Please enter the name of your first child: Michel
Please enter the age of your first child: 30
Please enter the name of your second child: Samantha
Please enter the age of your second child: 25
Please enter the name of your third child: Dominic
Please enter the age of your third child: 20
Please enter the sorting order of your children by name [asc]:
Please enter the sorting order of your children by age [desc]:
Your children names sorted alphabetically are Dominic, Michel, and Samantha
Your children names sorted by age are Michel, Samantha, and Dominic
Sample Output 2:
Please enter the name of your first child: Michel
Please enter the age of your first child: 30
Please enter the name of your second child: Samantha
Please enter the age of your second child: 25
Please enter the name of your third child: Dominic
Please enter the age of your third child: 20
Please enter the sorting order of your children by name [asc]: desc
Please enter the sorting order of your children by age [desc]: asc
Your children names sorted alphabetically are Samantha, Michel, and Dominic
Your children names sorted by age are Dominic, Samantha, and Michel
Your job here is to direct a sick user whether they need to stay home, go visit a walk-in clinic, go to ER (Emergency Room) or call 911 for an ambulance.
We will assume that the user is not feeling well and that they are running your program for guidance.
You will need to ask the user for their symptoms by offering them to pick from a list of five: nausea, dizziness, fever, headache and vomit. Based on their answers, you need to determine which of these five symptoms they are experiencing. They can be experiencing none and up to all of them.
You will prompt the user to enter their body temperature in Celsius (C ) or Fahrenheit (F ), by entering a decimal number with a capital F or capital C at the end of it.
If temperature is above 38 (C ) but below 39 (C ) inclusive, and experiencing three or more of the symptoms
If temperature is above 39 (C ) but below 40 (C ) inclusive, and experiencing four or more of the symptoms
If temperature is above 40 (C ) and experiencing all the symptoms
If they do not meet any of the conditions listed above
Sample Output:
< Optional: some one-line intro about your program>
< I will leave you to determine how to ask the user to indicate which symptoms they are experiencing>
Please enter your body temperature in Celsius or Fahrenheit by appending a C or an F to the temperature
value: 37.5C
< Your program should display the recommendation as stated above>