Question: In C++ please 1. Write a program that calculates the percentage of school districts that provide free full time or part-time preschool. Data from the

In C++ please

1. Write a program that calculates the percentage of school districts that provide free full time or part-time preschool. Data from the Department of Education Civil Rights Data Collection, 2013-14, includes information on free preschool availability. Each line in the file preschool.txt contains data from a different school district. The file contains two data values per line. The first value in each line of the file is for full time preschool and the second value is for part time preschool. The data in either column can be:

YES The service is provided

NO The service is not provided

something else It is unknown if the service is provided

Your program must calculate the percentage of school districts that provide free full time preschool and the percentage that provide free part time preschool. The percentages should be based on the number of YES values divided by the total of YES and NO values. Any other value must be ignored.

Example output:

Full time preschool at 39.2867 %

Part time preschool at 59.3264 %

2. Write a function called hms_to_secs() that takes three int valuesfor hours, minutes, and secondsas arguments, and returns the equivalent time in seconds (type long). Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!