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
Answer is B because portrait is define that they take only photographs of people and like to communicate with people they are we
quester [9]
Ty ive been looking for that answer
5 0
3 years ago
Whats is a better game?
Jobisdone [24]

Answer:

The first two are the best ones I see here, because I play them. Not sure how else to say that. Please make sure to also use brainly for school, though. Thanks!

3 0
2 years ago
How do you change your name on brainly after you have made an account​
zhuklara [117]

Answer:

u have to contact brianly and tell them that u accidentally made a different account name then the 1 u want

5 0
3 years ago
. Service recovery refers to A. the ability to quickly restore service following a service failure and provide compensation. B.
san4es73 [151]

Answer:

A. the ability to quickly restore service following a service failure and provide compensation.

Explanation:

Systems like servers are bound to fail at some point. This is because, it either has running parts or electronic components that could overheat or get shorted due to external or internal malfunction.

The ability of system to quickly restore services and operation after it experiences a total system failure is called system recovery.

7 0
3 years ago
After compiling source code, which command still needs to be run in order to copy the newly compiled binaries into a directory l
kumpel [21]

Answer:

Make install

Explanation:

In Computer programming, after compiling source code, make install still needs to be run in order to copy the newly compiled binaries into a directory listed in the PATH variable as well as copy supporting files (such as man pages) to the correct location on the filesystem.

In general, the commands that are executed by make install are defined in the Makefile.

5 0
4 years ago
Other questions:
  • Visual images taken directly from a source, such as pictures, charts, and graphs do not need a citation. true or false.
    8·1 answer
  • Su wants to apply the new font to the other slides of the presentation. She knows she can use the Format Painter tool
    12·1 answer
  • Ron is the IT director at a medium-sized company and is constantly bombarded by requests from users who want to select customize
    5·1 answer
  • Write a recursive function, replace, that accepts a parameter containing a string value and returns another string value, the sa
    5·1 answer
  • Which course must first-time drivers in Florida take to be eligible for their Learner License?
    11·1 answer
  • A _________________________ can use SOAP headers to carry meta information in its messages. A. Web service B. REST Service C. Co
    14·1 answer
  • 1. Assume you're using a three-button mouse. To access shortcut menus, you would
    6·2 answers
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    8·1 answer
  • How do you<br>know which Finance system <br>is the right one for an<br>Institutions<br>​
    9·1 answer
  • Which transform function would you use to operate the filename values into two separate columns, one for the filename and the ot
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!