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
Otrada [13]
2 years ago
10

Suppose you have a certain amount of money in a savings account that earns compound monthly interest, and you want to calculate

the amount that you will have after a specific number of months. The formula is as follows:
f = p * (1 + i)^t

• f is the future value of the account after the specified time period.
• p is the present value of the account.
• i is the monthly interest rate.
• t is the number of months.

Write a program that takes the account's present value, monthly interest rate, and the number of months that the money will be left in the account as three inputs from the user. The program should pass these values to a function thatreturns the future value of the account, after the specified number of months. The program should print the account's future value.

Sample Run

Enter current bank balance:35.7↵
Enter interest rate:0↵
Enter the amount of time that passes:100↵ 35.7
Computers and Technology
2 answers:
svetoff [14.1K]2 years ago
5 0

Answer:

See code below and explanation.

Explanation:

We can use Python for this wih the program Spyder to create the following code:

# INPUTS

p = float(input("Enter current bank balance: "))

i = float(input("Enter interest rate in %: "))

t = int(input("Enter the amount of time that passes: "))

# OUTPUTS

f=p*(1+ (i/100))**t

print("The future values is:", f)

We assume that the interest rate given is in % and we divide by 100 in order to convert to fraction.

And the example result obtained is given below:

Enter current bank balance: 35.7

Enter interest rate in %: 0

Enter the amount of time that passes: 100

The future values is: 35.7

Alecsey [184]2 years ago
4 0

Answer:p=float(input("Enter current bank balance:"))

i=float(input("Enter interest rate:"))

t=float(input("Enter the amount of time that passes:"))

print((p ((1+i)*t)))

Explanation:if this answer it looks weird its my phones fault

You might be interested in
What to do if your monitor is not displaying a picture
Butoxors [25]

Answer:

Refresh the page/

5 0
3 years ago
Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, s
Afina-wow [57]

The code is implemented based on the given operations.

Explanation:

#include <iostream>

#include <string>

using namespace std;

class dayType

{ private:

 string day[7];

 string presentDay;

 int numofDays;

public:

 void setDay(string freshDay);

 void printDay() const;

 int showDay(int &day);

 int nextDay(int day);

 int prevDay(int day) const;

 int calcDay(int day, int numofDays);    

 dayType()

 {

  day[0] = "Sunday";

  day[1] = "Monday";

  day[2] = "Tuesday";

  day[3] = "Wednesday";

  day[4] = "Thursday";

  day[5] = "Friday";

  day[6] = "Saturday";

  presentDay = day[0];

  numofDays = 0;

 };

 ~dayType();

};

#endif

#include "dayType.h"

void dayType::setDay(string freshDay)

{

  presentDay = freshDay;

}

void dayType::printDay()

{

  cout << "Day chosen is " << presentDay << endl;

}

int dayType::showDay(int& day)

{

  return day;

}

int dayType::nextDay(int day)

{

day = day++;

if (day > 6)

 day = day % 7;

switch (day)

{

case 0: cout << "The successive day is Sunday";

 break;

case 1: cout << "The successive day is Monday";

 break;

case 2: cout << "The successive day is Tuesday";

 break;

case 3: cout << "The successive day is Wednesday";

 break;

case 4: cout << "The successive day is Thursday";

 break;

case 5: cout << "The successive day is Friday";

 break;

case 6: cout << "The successive day is Saturday";

 break;

}

cout << endl;

return day;

}

 

int dayType::prevDay(int day)

{

day = day--;

switch (day)

{

case -1: cout << "The before day is Saturday.";

 break;

case 0: cout << "The before day is Saturday.";

 break;

case 1: cout << "The before day is Saturday.";

 break;

case 2: cout << "The before day is Saturday.";

 break;

case 3: cout << "The before day is Saturday.";

 break;

case 4: cout << "The before day is Saturday.";

 break;

case 5: cout << "The before day is Saturday.";

 break;

default: cout << "The before day is Saturday.";

}

cout << endl;

return day;

}

int dayType::calcDay(int addDays, int numofDays)

{

addDay = addDays + numofDays;

if (addDay > 6)

 addDay = addDay % 7;

switch(addDay)

{

case 0: cout << "The processed day is Sunday.";

 break;

case 1: cout << "The processedday is Monday.";

 break;

case 2: cout << "The processedday is Tuesday.";

 break;

case 3: cout << "The processedday is Wednesday.";

 break;

case 4: cout << "The processedday is Thursday.";

 break;

case 5: cout << "The processedday is Friday.";

 break;

case 6: cout << "The processedday is Saturday.";

 break;

default: cout << "Not valid choice.";

}

cout << endl;

return addDays;

}

4 0
2 years ago
15. Feelings (maps, coins, clues, etc.) and the invisClue books were some innovative ways used to keep __________ players engage
Anit [1.1K]

Answer:

pong i could be wrong i think its right tho

Explanation:

5 0
2 years ago
Read 2 more answers
Graded Assignments may be found at the end of each chapter of the required textbook under the title "Real-World Exercises". Each
mina [271]
Ok chapter 2 be done by 11:59
5 0
3 years ago
What is the difference, if any, between a project manager and a producer on a digital media production team? A project manager o
Flauer [41]

Answer:

A project manager just oversees the creative element, while a producer oversees the entire project.

It is B

7 0
2 years ago
Other questions:
  • What do you call the number that is used as an index to pinpoint a specific element within an array?
    14·1 answer
  • Nicole wants to create a database to collect information about sales transactions. She would like to use the database to look up
    6·2 answers
  • A block style business letter is:
    5·1 answer
  • Anna is making a presentation on the solar system. She wants to emphasize the planet names as they appear one by one on the pres
    11·1 answer
  • Which buttons should you use to publish and change a message on a message board
    6·2 answers
  • To switch from one open document to another, press _____.
    6·1 answer
  • When gathering information about certain occupations, be sure to understand how you are paid. What is the difference between a s
    12·2 answers
  • __________ are hosted on dedicated computers known as 'web servers'.​
    8·2 answers
  • Consider the following code.
    7·2 answers
  • Write an alogorithm and draw the Flow Chart to
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!