Question: Name this program avg.c Write a program that reads in four integers and prints the average (a real number) of these four integers. You can

Name this program avg.c Write a program that reads in four integers and prints the average (a real number) of these four integers. You can prompt the user four times (e.g. "Enter an interger") or prompt the user once (e.g. "Enter four intergers") to get four intergers. The output should clearly state what the output actually is, and formatted as follows: "The average is 123.400000"

Make sure your program works for input sets such as 1 2 3 4 (average is 2.500000) and -99 111 10 22 (average is 11.000000).

Example

Enter four integers: -99 111 10 22 The average is 11.000000 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!