Answered step by step
Verified Expert Solution
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
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 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
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