programming

create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 percent simple interest for one year. create a separate method to do the calculation and return the result to be displayed.

  1. 👍 0
  2. 👎 0
  3. 👁 1,272
  1. start
    Declarations
    num balance
    balance = computeBalance()
    output "After one year the balance is", balance
    stop
    balance = computeBalance()
    num computeBalance()
    Declarations
    num balance
    num PRINCIPAL = 5000
    num INTEREST_RATE = 0.02
    balance = PRINCIPAL * (1 + INTEREST_RATE)
    return balance

    1. 👍 1
    2. 👎 0

Respond to this Question

First Name

Your Response

Similar Questions

  1. Pseudocode

    Write pseudocode for a program that calculates a customer’s total price after tax. The program will ask the user for the price of the item they are buying. Then the program will add a 5% tax to the item and output the final

  2. C++

    // Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert

  3. CIS

    Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter a value. The program multiplies the value by 10 and outputs the result.

  4. Programming and Design

    Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a

  1. computer science

    I need help with my Java homework! Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were

  2. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of

  3. Programming

    Design a program in pseudocode that calculates the amount of money a person would earn over a period of time if their salary is one penny the first day, and then doubles each day. The program should ask the user for the number of

  4. CIS

    Chocolate Delights Candy Company manufactures several types of candy. Design a flowchart using Visual Logic for the following: A program that accepts a candy name (for example, “ chocolate-covered blueberries”), price per

  1. Programming

    Design a program that calculates the total amount of a meal purchased at a restaurant. The program should ask the user to enter the charge for the food, and the calculate the amount of a 15 percent tip and 7 percent sales tax.

  2. computer programming

    Design the logic for a program that allows a user to enter 10 numbers, then displays each and its difference from the numeric average of the numbers

  3. Program Logic Design

    create a flowchart that shows the logic for a program that generates a random number; then ask the user to think of a number between 1 and 10. The display then randomly generated number so the user can see whether his or her guess

  4. computer science

    write a program that calculates a customer's monthly bill. it should input customer name, which package the customer has purchased, and how many hours were used. it should then create a bill that includes the input informtion and

You can view more similar questions or ask a new question.