Question: Create a program that displays the average of three integers. The program should pass the three integers to a program-defined function named calcAvg , which
- Create a program that displays the average of three integers. The program should pass the three integers to a program-defined function named calcAvg, which should return the result as a double number. Name the formal parameters n1, n2, and n3. Use the following names for the actual arguments: num1, num2, and num3. Assign the functions return value to a double variable named avg. Display the average in fixed-point notation with one decimal place.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
