Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that calls a void function from main. When called, the function

ID: 3657995 • Letter: W

Question

Write a program that calls a void function from main. When called, the function will display: ********************************************************************************** Lab 10 - Your first and last name This is what displays when the void function displayLabInfo is called from main() ********************************************************************************************* Write a program that declares a 5-element array of integer values named gradeArray that stores the values of 5 test grades. The program will then prompt the user to enter 5 grades that will be assigned to the array from the keyboard. Use for loops to: a. sort the grades in ascending order (hint: see page 398) b. display the highest grade (last element) c. display the lowest grade (first element) d. accumulate the values stored in the array into an integer variable named total and display the average of the array grades (hint: see page 398). This lab is designed to give you practice with writing a void function that displays a message when called, and with declaring, loading, sorting, and accessing arrays.

Explanation / Answer

#include #include using namespace std; void displayLabInfo(string name[]); int main(){ string name[2]; double grades[5],temp,total; int i; //get name coutname[0]; coutname[1]; //get grade for(i=0;i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote