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
xenn [34]
4 years ago
8

An online bank wants you to create a program that shows prospective customers how their deposits will grow. Your program should

read the initial balance and the annual interest rate. Interest is compounded monthly. Print out the balances after the first three months. Here is a sample run:
Initial balance: 1000

Annual interest rate in percent: 6.0

After first month: 1005.00

After second month: 1010.03

After third month: 1015.08
Computers and Technology
2 answers:
EleoNora [17]4 years ago
8 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   

 Scanner input = new Scanner(System.in);

 System.out.print("Enter the initial balance: ");

 double initialBalance = input.nextDouble();

 System.out.print("Enter the annual interest rate: ");

 

 double annualInterestRate = input.nextDouble();

 double monthlyInterest = (annualInterestRate / 100) / 12;

       double currentBalance = initialBalance + (initialBalance * monthlyInterest);

 

 for(int month=1; month<=3; month++){

     System.out.printf("Your balance after " + month + ". month: %.2f \n", ((initialBalance + (initialBalance * monthlyInterest)* month)));

 }

}

}

Explanation:

* The code is written in Java

- Ask user to enter initial balance and annual interest rate

- Calculate the monthly interest

- Calculate the current balance

- Print the value of the balance after first three months using for loop

lana66690 [7]4 years ago
5 0

Answer:

  1. init_balance = float(input("Initial balance: "))
  2. interest = float(input("Annual interest rate in percent: "))
  3. montly_interest = (interest / 100) / 12
  4. current_amount = init_balance + init_balance * montly_interest
  5. print("After first month: %.2f " % current_amount)
  6. current_amount = current_amount + current_amount * montly_interest  
  7. print("After second month: %.2f " % current_amount)
  8. current_amount = current_amount + current_amount * montly_interest
  9. print("After third month: %.2f " % current_amount)

Explanation:

The solution code is written in Python.

Firstly, prompt user to input initial balance and annual interest rate using input function (Line 1 - 2).

Next, divide the annual interest by 100 and then by 12 to get the monthly interest rate (Line 4).

Apply the formula to calculate the current amount after adding the monthly interest (Line 5) and display the current month after first month (Line 6).

Repeat the same steps of Line 5 - 6 to calculate amount after two and three months and display print them to console. (Line 8 - 12).

You might be interested in
Convert 10101010 into decimal number system​
geniusboy [140]

Answer:

170 hope this helps you with

3 0
3 years ago
Read 2 more answers
Compare and contrast the properties of a centralized and a distributed routing algorithm. give an example of a routing protocol
Naily [24]

Answer and Explanation:

Centralized : Central node in the system gets whole data about the system topology, about the traffic and about different hubs. This at that point transmits this data to the particular switches. The benefit of this is just a single hub is required to keep the data. The hindrance is that if the focal hub goes down the whole system is down, for example single purpose of disappointment.

Distributed: Distributed nodes gets data from its neighboring hubs and afterward takes the choice about what direction to send the parcel. The weakness is that if in the middle of the interim it gets data and sends the parcel something changes then the bundle might be deferred.

Example :

Link State takes Centralized approach

Distance Vector takes Decentralize approach

8 0
3 years ago
Select the correct answer. Which keyboard feature is a form feed character? A. uppercase letters B. Control key C. lowercase let
Valentin [98]

Answer:

B . control key

Explanation:

dadadadads

4 0
3 years ago
What is quantum computing
Aleks [24]
Quantum computing is the use of quantum-mechanical phenomenon such as superposition and entanglement to perform computation.
4 0
3 years ago
Read 2 more answers
The factorial of an integer N is the product of the integers between 1 and N, inclusive. Write a while loop that computes the fa
alexdok [17]

the function and loop will be

def factorial(x):

   total = 1

   if x != 1 and x != 0:

       for i in range(x,1,-1):

           total *= i

   return total

3 0
4 years ago
Other questions:
  • What are Three types of informational references
    9·2 answers
  • Each character in a string has a(n) _______________ which specifies its position in the string.
    13·1 answer
  • Peter accumulated many photos from his visit to Wisconsin. He wants to upload these photos to a social networking site. Which fi
    12·1 answer
  • Create a DisplayBox application that prompts the user for a height and width and then displays a box of that size. The DisplayBo
    8·1 answer
  • This chapter uses the class rectangleType to illustate how to overload the operators +, *, ==, !=, &gt;&gt;, and &lt;&lt;. In th
    15·1 answer
  • ___ consists of a central conductor surrounded by a shield (usually a wire braid).
    9·1 answer
  • 2. Which the following may be a reason for giving a Page Quality (PQ) rating og Highest? Select all that apply (True or False)
    14·1 answer
  • Which of the following is not a valid SQL command? (Points : 2) UPDATE acctmanager SET amedate = SYSDATE WHERE amid = 'J500';
    11·1 answer
  • C++ Proagram
    7·1 answer
  • In critical thinking, an argument is:
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!