Question: Question 1 10 Points Write a C++ program that defines an integer array of size 18, the program asks the user to fill the array


Question 1 10 Points Write a C++ program that defines an integer array of size 18, the program asks the user to fill the array from the keyboard, After filling the array, the function prints all values that are divisible by 3 and less than the average Use the editor to format your answer Question 3 Gratis file containing unknown number of lines, each line containing three integer values representing the time un seconds separated by space. Write a well-documented CH program that: the threates from the file 2. ayol the road wales is negative, prints on the screen an error message: "Error: Invalid negative time value.!". 2. erwise.catates the number of seconds in the given time, where one hour is 60 minutes and one minute is 60 Sends to another file both time values: the read and the calculated as shown below. Spears (14until the file end is reached For example if the red values are 12 13 20), then your program must send to the new file the following: The times seconds is 8000 The time HHMMS format is 2:13:20 Question 3 Given a text file containing unknown number of lines, each line containing three integer values representing th (hours minutes seconds) separated by space. Write a well-documented C++ program that 1. Reads the three values from the file, 2. If any of the read values is negative, prints on the screen an error message: "Error: Invalid negative time 3. Otherwise, calculates the number of seconds in the given time, where one hour is 60 minutes and one seconds. 4. Sends to another file both time values: the read and the calculated as shown below 5. Repeats steps (1-4) until the file end is reached For example, if the read values are (2 13 20), then your program must send to the new file the following The time is seconds is 8000 The time in HH:MM:SS format is 2:13:20 use the editor to format your onswer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
