Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please typing (a) () Develop a program that performs the following task 5 times using only the for-loop flow control structure to write: obtain an

image text in transcribedplease typing

(a) () Develop a program that performs the following task 5 times using only the for-loop flow control structure to write: obtain an integer value from the user, calculate the average of all integers entered so far, and display the average. Below is an example of the input and output of the program with some explanations. Average = 1/1 Enter an integer: 1 Average so far: 1 Enter an integer: 2 Average so far: 1.5 Enter an integer: 3 Average so far: 2 Average = (1 + 2)/2 = 1.5 Average = (1 + 2 + 3)/3 = 2 (10 marks)

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Are t-tests or Z-tests used more often in business research? Why?

Answered: 1 week ago