Question

Create the Pseudocode logic for a program that helps a user to calculate one year of...

Create the Pseudocode logic for a program that helps a user to calculate one year of simple interest.

  • Create an appropriately named method to:
    1. input the amount the user is investing (principal)
    2. calculate one year of interest at a rate of 7% (the formula is quite simple, interest is the amount invested times 0.07)
    3. output the interest
  • Be aware that any variables required by the method must be declared in the body of the method, not after immediately start like we have been doing up to now.
  • Call the method in the main code body (the code between start and stop).
0 0
Add a comment Improve this question Transcribed image text
Answer #0

Pseudo Code

function calculateSimpleInterest(Argument principalAmount){

declare interestRate = 0.07

declare simpleInterest = principalAmount * interestRate

return simpleInterest

}

In the main function{

prompt "Enter principal amount"

take the principal amount input

pass the principle amount to calculateSimpleInterest function and print the result

}

Add a comment
Know the answer?
Add Answer to:
Create the Pseudocode logic for a program that helps a user to calculate one year of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • a. Create the logic for a program that calculates and displays the amount of money you...

    a. 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. b. Modify the program in Exercise 3a so that the main program prompts the user for the amount of money and passes it to the interest-calculating method. c. Modify the program in Exercise 3b so...

  • the author's pseudocode    it follows this template 3 Design the logic for a program for Nos...

    the author's pseudocode    it follows this template 3 Design the logic for a program for Nos Encanta Tu Interés credit card company that a) Allows the user to enter their name, credit card number, beginning balane and monthly interest rate b) For the next full year (12 months), 1. Outputs the month number and the balance at the beginning of the month 2. Allows the user to enter the amount of their payment, and the amount of their purchases for...

  • Programming language: PYTHON Prompt: You will be creating a program to show final investment amounts from...

    Programming language: PYTHON Prompt: You will be creating a program to show final investment amounts from a principal using simple or compound interest. First, get a principal amount from the user. Next, ask the user if simple or compound interest should be used. If the user types in anything other than these options, ask again until a correct option is chosen. Ask the user to type in the interest rate as a percentage from 0 to 100%. Finally, ask the...

  • Create a Java Program/Class named ComputeInterest to calculate compound interest. This can all be done entirely...

    Create a Java Program/Class named ComputeInterest to calculate compound interest. This can all be done entirely in the main() method. Create a double variable named currentBalance. Create a double variable named newBalance. Create a final double variable named INTEREST_RATE and assign 1.05 to it. Create a int variable named yearCount. Prompt for the "Number of years to invest" and store the input into the yearCount variable. Prompt for the "Amount to Invest" and store this in the currentBalance variable. Assign...

  • IN PSEUDOCODE and C++ Program 3: Give a baby $5,000! Did you know that, over the...

    IN PSEUDOCODE and C++ Program 3: Give a baby $5,000! Did you know that, over the last century, the stock market has returned an average of 10%? You may not care, but you’d better pay attention to this one. If you were to give a newborn baby $5000, put that money in the stock market and NOT add any additional money per year, that money would grow to over $2.9 million by the time that baby is ready for retirement...

  • Use program control statements in the following exercises: Question 1 . Write pseudocode for the following:...

    Use program control statements in the following exercises: Question 1 . Write pseudocode for the following: • Input a time in seconds. • Convert this time to hours, minutes, and seconds and print the result as shown in the following example: 2 300 seconds converts to 0 hours, 38 minutes, 20 seconds. Question 2. The voting for a company chairperson is recorded by entering the numbers 1 to 5 at the keyboard, depending on which of the five candidates secured...

  • CSC 130 Lab Assignment 8 – Program Menu Create a C source code file named lab8.c...

    CSC 130 Lab Assignment 8 – Program Menu Create a C source code file named lab8.c that implements the following features. Implement this program in stages using stepwise refinement to ensure that it will compile and run as you go. This makes it much easier to debug and understand. This program presents the user a menu of operations that it can perform. The choices are listed and a prompt waits for the user to select a choice by entering a...

  • package _solution; /** This program demonstrates how numeric types and operators behave in Java Do Task...

    package _solution; /** This program demonstrates how numeric types and operators behave in Java Do Task #1 before adding Task#2 where indicated. */ public class NumericTypesOriginal { public static void main (String [] args) { //TASK #2 Create a Scanner object here //identifier declarations final int NUMBER = 2 ; // number of scores int score1 = 100; // first test score int score2 = 95; // second test score final int BOILING_IN_F = 212; // boiling temperature double fToC;...

  • Java Description Write a program to compute bonuses earned this year by employees in an organization....

    Java Description Write a program to compute bonuses earned this year by employees in an organization. There are three types of employees: workers, managers and executives. Each type of employee is represented by a class. The classes are named Worker, Manager and Executive and are described below in the implementation section. You are to compute and display bonuses for all the employees in the organization using a single polymorphic loop. This will be done by creating an abstract class Employee...

  • Write a program that will accept from the user a text file containing hurricane data along...

    Write a program that will accept from the user a text file containing hurricane data along with an output filename. The data consists of the year, the number of storms, the number of hurricanes, and the damage in millions of US Dollars. The first line contains the word “Years” followed by the first year listed and the last year listed separated by tabs. The following lines contain the data separated by tabs. A sample text file is available in this...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT