Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with my code? I need the code to be in C Program. Compound Interest 1. Write a function, compound_interest with three

Can someone help me with my code? I need the code to be in C Program.image text in transcribedimage text in transcribed

Compound Interest 1. Write a function, compound_interest with three double parameters to compute the amount of money, A, that you will have in n years if you invest P dollars now at annual rate i. The formula is A = P(1 + i)n 2. Write a main program that will permit the user to enter P, i, and n. Call your function to compute A. Your main program should echo the inputs and print the final dollar amount. Hint: You need to check the following: P, the investment amount, must be greater than 0 i, the annual interest rate, must be greater than 0 and less than or equal to 15 n, the number of years, must be greater than 0 Sample Output Future Value of an Investment Dollar amount to invest: 100 Percentage interest rate: 6.8 Years of investment: 10 If you invest $100 at 6.8% Its value in 10 years will be $193.069

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

Data Analytics And Quality Management Fundamental Tools

Authors: Joseph Nguyen

1st Edition

B0CNGG3Y2W, 979-8862833232

More Books

Students also viewed these Databases questions