Module 2 Homework.docx - Module 2 Homework 3 Assume that...

This preview shows page 1 - 2 out of 3 pages.

Module 2 Homework3.) Assume that speed = 10 and miles = 5. What is the value of each of the following expressions?a. speed + 12 – miles *2: 34
d. speed + speed * miles + miles: 65e. (10 – speed) + miles / miles: 15a. Draw a hierarchy chart and then plan the logic for a program needed by Hometown Bank. The program determines a monthly checking account fee. Input includes an account balance and the number of times the account was overdrawn. The output is a fee, which is 1 percent of the balance minus 5 dollars for each time the account was overdrawn. Use three modules. The main program declares global variables and calls housekeeping, detail and end-of-job modules. The housekeeping module prompts for and accepts a balances. The detail module prompts for and accepts overdrafts, computes the fee and displays the result. The end-of-job module displays the message Thanks for using this program.StartOutput “Hometown Bank”String END_LINE = “Thanks for using this program”String QUIT = “NNN”num balance

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture