Can some one make this into a flowchart. Need ASAP please Main Read Data Calculate Average Print Average Number of Steps End

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Can some one make this into a flowchart. Need ASAP please

Main

Read Data

Calculate Average

Print Average Number of Steps

End

 

Read Data

Open fitness.dat

While there are still records in the file

Read the month

Read the day

Read the year

Read the number of steps taken

Store the number of steps taken in the array

Close the file

Return the array

End

 

Calculate Average

Declare array monthAverages

Declare monthCounter

Declare sum

For each month

monthCounter = 0

sum = 0

For each day

If steps[day] != 0

monthCounter++

sum = sum + steps[day]

EndIf

EndFor

monthAverages[month] = sum/monthCounter

EndFor

Return monthAverages

End

 

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Flowchart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT