Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started