Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete, compile ready program, to calculate some parameters of an investment in bitcoin. A welcome message should be displayed, the user prompted for

Write a complete, compile ready program, to calculate some parameters of an investment in bitcoin. A welcome message should be displayed, the user prompted for the principal and a future Value for compound interest, calculations made, and output formatted as shown in the example.

You will need the pow function from the cmath library.

written in c++ is 32=pow(2,5);

Equations for Compound interest

Formula for compound interest

Future Value= principal(1+ (rate/1)2)

Formula for continuous compounding

Future Value=principal*erate*2

Example Output

tim@debian:~$ ./a.out Please enter the principal and future value for compound interest. 30000 45000 Calculations with compound interest Rate: 0.224745 Continuous compounding at that rate gives you 47024.2

Blue - output from program

Red - user input

Orange - calculate values

Additional Instructions

  • Algebra may be required to modify the given formulas to be suitable for you program
  • A defined constant must be used for e
  • Values calculated are: rate and future value with continuous interest
  • Output of the program must match the example as close as possible.
  • Do not include comments.
  • No error testing is required.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions