// main module Module main() // Local variables Declare Integer time   // loop on time(seconds For time = 1 to 10 Call showFall(time) End For   End Module   // The showFall module shows falling distance Module showFall(Integer time)   Display "Falling distance is: ", fallingDistance(time), “ meters.”   End Module   // The fallingDistance function returns distance fallen in n seconds Function Integer fallingDistance (Integer time)      Declare Integer fall        Set fall = (9.8 * time * time) / 2      Return fall   End Function what would the flowchart be?

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question

// main module

Module main()

// Local variables

Declare Integer time

 

// loop on time(seconds

For time = 1 to 10

Call showFall(time)

End For

 

End Module

 

// The showFall module shows falling distance

Module showFall(Integer time)

 

Display "Falling distance is: ", fallingDistance(time), “ meters.”

 

End Module

 

// The fallingDistance function returns distance fallen in n seconds

Function Integer fallingDistance (Integer time)

     Declare Integer fall

 

     Set fall = (9.8 * time * time) / 2

     Return fall

 

End Function

what would the flowchart be?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
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++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning