Define a function named average_grade. This function returns a double and has four double arguments, test1, test2, test3, test4. The return value should be the average, or arithmetic mean of the four arguments. Be sure to include a comment that tells briefly what the function does.

What will be an ideal response?


// returns arithmetic mean of the arguments test1 - test4
double average_grade (double test1-, double test2,
double test3, double test4)

{
double average;
average = (test1 + test2 + test3 + test4) / 4;
return average;

Computer Science & Information Technology

You might also like to view...

You can apply uniform page layouts to grouped worksheets

Indicate whether the statement is true or false

Computer Science & Information Technology

Which Cisco IOS command is used to prevent a configured OSPF interface from forming a neighborship with any potential neighbors?

A) passive-interface interface B) ip ospf process-id passive C) ip ospf process-id no-advertise D) advertise interface disable

Computer Science & Information Technology

? ? The figure above shows a project plan that includes a section for the budget. In general, it is recommended that a budget be included ____.

A. if the project is coming in over budget B. if the project is more than $10,000 C. in every website design project D. if the client asks for one

Computer Science & Information Technology

The Instruction Fetch is implemented in the text with first 4 states and then three. What would have to be done to the datapath to make it two states long?

What will be an ideal response?

Computer Science & Information Technology