Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

2. Provide recommendations for effective on-the-job training.

Answered: 1 week ago