Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that outputs a moving average (see: https://en.wikipedia.org/wiki/Moving_average) For a series of whitespace delimited integers (note, the running average should be rounded to
Write a program that outputs a moving average (see: https://en.wikipedia.org/wiki/Moving_average) For a series of whitespace delimited integers (note, the running average should be rounded to the hundredth place. However, if a non-positive number is encounted, the average should be reset and a newline character emitted. Otherwise, the running averages should be separated by a space. in C++
NEED ASAP
INPUT OF THE TEST CASE 1 34 99 2 17 12 19 44 YOUR CODE'S OUTPUT 1 did not compile/run! wNr - -- THE CORRECT OUTPUT OF THE TEST CASE 1 34.00 66.50 50.00 40.50 36.20 37.50Step 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