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
damaskus [11]
3 years ago
13

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

prompt the user for initial balance and the annual interest rate in percent. Choose double datatypes for variables to store initial balance and annual interest rate that you received from the user. Interest is compounded monthly. Computer and print out the balances after the first three months.
Test your program when user gives initial balance as 1000 and interest rate as 6.
Computers and Technology
1 answer:
Sauron [17]3 years ago
6 0

Answer:

Written in C++

#include<iostream>

#include<math.h>

using namespace std;

int main(){

double Amount, Rate;

cout<<"Initial Amount: ";

cin>>Amount;

cout<<"Rate: ";

cin>>Rate;

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

Amount = Amount *(pow((1+Rate/100),1));

cout<<"Balance: "<<Amount<<endl;

}

return 0;

}

Explanation:

The program was written in C++ (The line by line explanation is as follows)

This line declares Amount and Rate as double

double Amount, Rate;

This line prompts user for Amount

cout<<"Initial Amount: ";

This line gets input for Amount

cin>>Amount;

This line prompts user for Rate

cout<<"Rate: ";

This line gets input for Rate

cin>>Rate;

The following iteration calculates and prints the new balance at the end of each month using compound interest formula

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

Amount = Amount *(pow((1+Rate/100),1));

cout<<"Balance: "<<Amount<<endl;

}

You might be interested in
Write a function (funception) that takes in another function func_a and a number start and returns a function (func_b) that will
castortr0y [4]

Answer:

The code for this question can be defined as follows:

def funception(func_a, start):#define a method funception that accept two parameter

   def func_b(stop): #define a method func_b that accept one parameter

       if start < 0:#define if block that checks start parameter value less then 0

           return #Use return keyword

       if start > stop:#define if block that checks start parameter value greater then stop parameter value

           return func_a(start)#use return keyword to call func_a method

       else:#define else block

           product = 1#define a variable product and assign a value 1

           for i in range(start, stop):#define for loop to calculate the value

               product= product * func_a(i)#multiply the method value in product variable

           return product#return prod value

   return func_b#return func_b value

def func_a(num):#define a method func_a that accept a num variable as a parameter

   return num + 1#use return keyword by increment num value by 1

Explanation:

In the above python program code, a method "funception" is defined that accepts two parameters that are "func_a and start", in which "func_a" is a method name, that accepts a "num" variable in its parameter and returns its one increment value.

  • Inside the method, another method that is "func_b" is defined that accepts a "start" variable in its parameter and uses it if block to check "start and stop" values.
  • If the start value is less then 0 it will exit the program. If the start value is less then stop value so, it will return the "func_a" value.
  • In the else part, a "product" variable is defined that multiplies the method "func_a" value and returns its value.
3 0
3 years ago
Modern ancestor of the typewriter
Rashid [163]
I would think Microsoft Word would be the answer. It does everything a typewriter can.
4 0
3 years ago
Read 2 more answers
Write an SQL statement that uses all of the SQL built-in functions on the Quantity-OnHand column. Include meaningful column name
Alexxx [7]

Answer:

Query:

select sum(QuantityOnHand) as "Total Quantity",  count(QuantityOnHand) as "Total Quantity column",  avg(QuantityOnHand) as "Average Quantity",  max(QuantityOnHand) as "Maximum Quantity", min(QuantityOnHand) as "Minimum Quantity" from inventory ;

Explanation:

The above SQL query holds all the SQL built-in functions. This type of function calculates the results like mathematics functions. There are 5 functions of these types which are as follows:-

  1. sum function is used to calculate the sum.
  2. count function is used to count the number of rows.
  3. min function is used to find the minimum value.
  4. max function is used to find the maximum value.
  5. avg function is used to find the average of the number.

The above query also holds the as a keyword which is used to display the duplicate column name in the place of the original column name.

8 0
4 years ago
Please can someone help me answer this question.
Westkost [7]

Answer:

Upload an image to help people

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

7 0
3 years ago
What is a variable in programming?
HACTEHA [7]
A symbol or set of characters in a programming statement whose value can be changed
3 0
3 years ago
Other questions:
  • Consider the following two implementations of the same algorithm, each written in a different language.
    11·1 answer
  • A microphone is a type of electronic.<br><br> True/Faulse
    14·1 answer
  • Write the definition of a function half which recieves a variable containing an integer as a parameter, and returns another vari
    15·1 answer
  • How would asking questions or defining problems be used in this career?<br> -
    13·1 answer
  • As with most professions, photography comes with its own unique set of terms and jargon. Identify at least four different words
    5·1 answer
  • What happens when in Word 2016 when the home ribbon tab is clicked on?
    13·1 answer
  • Given the code as follows: main() { int i = 3, n; float x; x = i; n = 8 % x; } What problem will occur? Group of answer choices
    12·1 answer
  • Which IP QoS mechanism involves prioritizing traffic? Group of answer choices IntServ RSVP COPS DiffServ None of the above
    14·1 answer
  • In a school 50% of the students are younger than 10, 1/20 are 10 years old and 1/10 are older than 10 but younger than 12, the r
    7·1 answer
  • According to the selection, speech-software developers are still striving to develop speech-recognition technology that —
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!