1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Ratling [72]
3 years ago
10

A.Create the logic for a program that calculates and displays the amount of money you would have if you invested $5000 at 2 perc

ent 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 Excercise 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 Excercise 3b so that the main program also prompts the user for the interest rate and passses both the amount of money and the interest rate to the interest calculating method.

// Pseudocode PLD Chapter 9 #3 pg. 421

// Start

// Declarations

// num amount

// num newAmount

// num interestRate

// output "Please enter the dollar amount. "

// input amount

// output "Please enter the interest rate(e.g., nine percet should be entered as 9.0). "

// input interestRate

// newAmount = FutureValue(amount,interestRate)

// output "The new dollar amount is ", newAmount

// Stop

//

//

//

// num FutureValue(num initialAmount, num interestRate)

// Declarations

// num finalAmount

// finalAmount = (1 + interestRate/100) * initialAmount

// return finalAmount
Computers and Technology
1 answer:
lianna [129]3 years ago
7 0

Answer:

see explaination

Explanation:

a)

amount = 5000

rate = 2

year = 1

interest = calculateInterest(amount, rate, year);

finalAmount = amount + interest

###### function ######

calculateInterest(amount, rate, year):

interest = (amount*rate*year)/100;

return interest

b)

amount <- enter amount

rate = 2

year = 1

interest = calculateInterest(amount, rate, year);

finalAmount = amount + interest

###### function ######

calculateInterest(amount, rate, year):

interest = (amount*rate*year)/100;

return interest

c)

#include <iostream>

using namespace std;

// function defination

double calculateInterest(double amount, double rate, int year);

int main(){

double amount, rate;

int year = 1;

cout<<"Enter amount: ";

cin>>amount;

cout<<"Enter rate: ";

cin>>rate;

// calling method

double interest = calculateInterest(amount, rate, year);

cout<<"Amount after 1 year: "<<(amount+interest)<<endl;

return 0;

}

// function calculation

double calculateInterest(double amount, double rate, int year){

return (amount*rate*year)/100.0;

}

You might be interested in
Explain how it makes you feel that you must share the road with others
Tpy6a [65]
I feel like it is good to share the road.

8 0
3 years ago
PLEASEEEEEE HELP, ILL DO ANYTHING JUST ANSWER THESE CORRECTLY!!!!!TYSM!!!
REY [17]

10 minutes

Daguerreotype

Connect the cable between them

Shutters

A digital camera

Chemicals

Joseph Niepce

White

Copper

Camera Lenses

False

True

True

True

False

Thank you for taking photography class, I am doing the same class (FLVS SQUAD!!)

3 0
3 years ago
Read 2 more answers
Which option is the primary means of communication for coauthors working on PowerPoint presentations?
nasty-shy [4]

Answer:

Comments

Explanation:

The fastest method of communication, and allows everyone that has access to the PowerPoint to see it.

4 0
3 years ago
What was your first pokemon game<br><br><br> if you have not played one just comment don't answer
d1i1m1o1n [39]

Answer:

FireRed & LeafGreen

Explanation:

5 0
3 years ago
Read 2 more answers
Technician A says that using 100% coolant is better for freeze protection in an engine than a mixture with water. Technician B s
Levart [38]

Answer:

Technician B is right.

Explanation:

Generally speaking, most engines use a mixture of 50/50 coolant and water.

This is ideal in places where the weather never gets too extreme, and temperatures rarely go below 0 degrees. Using 100% antifreeze or coolant in any engine is not recommended since this doesn't have the same ability as water to transfer heat to or from the engine. Antifreeze is used to lower the freezing point of water, and it is water itself that does the job of keeping engine temperatures safe.

4 0
3 years ago
Other questions:
  • (04.01 MC)
    11·1 answer
  • Analyze the following network traffic logs depicting communications between Computer1 and Computer2 on opposite sides of a route
    12·1 answer
  • What advantage does having ultraviolet vision give bees?
    10·2 answers
  • What are three ways you cite evedince
    5·2 answers
  • If an Administrator performs a clean install of Windows Server 2012 R2 on a new server, and then moves critical domain services
    9·1 answer
  • Write a Java Program that can compute the mean, median, the highest, and the lowest of the students’ scores in a class. First, t
    6·1 answer
  • The length property of the String object returns
    15·1 answer
  • Create and Provide complete program that includes a comments header with your name, course, section and other program details an
    9·1 answer
  • Identify the type of software that should be in main memory in order to use the keyboard? *
    14·1 answer
  • In python please.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!