answer.
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]
1 year 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]1 year 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
Universal Containers has implemented a strict software architecture for their custom Apex code. One of the requirements is that
maxonik [38]

Answer:

The required coding for the architect to meet these requirement has been described below.

Explanation:

The following ways will help the architecture to meet the requirement.

Create a reusable SOQLQueries class; specify “With Sharing” on the methods that require user context and “Without Sharing” on the methods requiring system context.

Create a SystemSOQLQueries class and a UserSOQLQueries class; set the “With Sharing” keyword on the UserSOQLQueries class and “Without Sharing” on the SystemSOQLQueries class.

6 0
1 year ago
Every chart has a corresponding ____ that contains the numerical data displayed by the chart.
katen-ka-za [31]

Answer:

B) Worksheet

Explanation:

In Microsoft Excel and all the other spreadsheet applications, a worksheet is  a file that contains cells, the cells are an intersections of rows and columns, and it provides the interface where the users can input and modify data, because of the row/column nature of worksheets, a table structure can easily be developed for the organization of data/information from where they can be plotted to a chart. Hence every chart has a corresponding worksheet containing its numerical data.

4 0
1 year ago
A wireless network does not benefit like a wired network does, when it comes to collision reduction. Which device reduces collis
Leviafan [203]

Answer:

Switch

Explanation:

The network switch is an networking hardware also known as a network bridging device used to connect devices on the network together and receives and forward data from source to destination through packet switching.

In order to eliminate or reduce collision within the network, present day wired networks make use of network switches that connects each device to its own port on the switch, making the switch the domain of collision for half duplex links or whereby the link is a full duplex links the collision possibility is completely eliminated.

3 0
2 years ago
7. Which control is used to display multiple records in List Form
padilas [110]

Answer:

I think a is correct answer.

3 0
1 year ago
Read 2 more answers
In 1-2 sentences, describe how you would open a new word processing document.
Gennadij [26K]
This depends on what computer and
System it's running on
4 0
1 year ago
Other questions:
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In one to two sentences,
    9·2 answers
  • Which of the following best defines the term cross-platform application?(A) A program used to coordinate data sharing among mult
    14·2 answers
  • What company built its first computer from a wooden box
    12·2 answers
  • You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in
    6·1 answer
  • Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur eve
    9·1 answer
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • A company has a file server that shares a folder named Public. The network security policy specifies that the Public folder is a
    14·1 answer
  • Write a MATLAB function named lin_spaced_vector with two inputs and one return value. The first input will be a single real numb
    7·1 answer
  • The variable isopen is to be used to indicate whether or not a store is currently open. Which of the following is the most appro
    11·1 answer
  • Create an application named SalesTransactionDemo that declares several SalesTransaction objects and displays their values and th
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!