Question: Write a complete C++ program, including comments in both the program in each function. The program will send all output to a file, plan; first
Write a complete C++ program, including comments in both the program in each function. The program will send all output to a file, plan; first write show the topics needed. The main program will start by calling a function named introduction which prints to the output file your name and a description of what the program does, write this function last. Call the function once, as the first item in the program AFTER the declaration. The introduction function will not be sent any parameters, and it will not return a value. It will print several lines of output explaining what the program does. The main program will next ask the user to type in an integer, which main will in num. Then main will call the function sending it num as a parameter value. The function sumcubes will find and return the sum of the first num cubes. The main program should print the value returned from the function (together with an appropriate message). Next the main program will use a loop to read in and process 7 sets of three integer values. (Just let the loop count to 7.) Each of the integers can be positive, negative, or zero, some even and some odd for each group of integer values, the program will do the following processing: 1 The main program will ask the user to type in three integer values, and the main program will read in and then print the three numbers. 2. The main program will call a function named howmanyodd, sending it the three integer values. The function will determine how many (0, 1, 2, or 3) of the three values are odd and send the answer back to the main program. The answer sent back will be a number from 0 to 3. The main program will print a message explaining the value returned. For example, if you send the values 4 5 - 9 to the function, the function will return 2, and the main program will print a message like this; 2 of these numbers is/are odd. The main program will then call a function named findsumandprod sending it two of the integers at a time. The function will determine the sum and the product of these tow value and print them, together with appropriate messages. Then the main program will call the function findsumandprod two more times, each time sending it a different set of two values from the group of three. To repeat: The main program will call findsumandprod three times: once with the first and second integers, once with the second and third integers, once with the third and first integers For each call, the function will print the two integers, their sum, and their product, together with clear messages. Do NOT send all three values to the function in one call. For example, if the numbers are 4 5 and -9, the main program should first send 4 and S to the function to be processed. Then the main program should send 5 and -9 to the function. Then main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
