Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Interest Comparison, can someone look at my code and see where i went wrong? My output doesn't match the grading output. My code: Output differs.

Interest Comparison, can someone look at my code and see where i went wrong? My output doesn't match the grading output.

image text in transcribed

My code:

image text in transcribed

Output differs. See highlights below. pt 1000 0.05 3 Enter value for principle: Enter value for percent rate: Enter time for interest to be calculated over in years: Simple Interest: 1150.000000 Compound Interest: 1157.624878 Continuously Compounded Interest: 1161.835449 Your output Enter value for principle: Enter value for percent rate: Enter time for interest to be calculated over in years: Expected output Simple Interest: 1150.000000 Compound Interest: 1157-625000 Continuously Compounded Interest: 1161.834243 #include 2 #include 3 #define E 2.7183 5 int main) f 6 float p,r,t; float SI,CI,CCI; 9 printf("Enter value for principle: "; 10 scanf("%f",&p); 12 printf("Enter value for percent rate: ") scanf("%f",&r); 14 15 printf("Enter time for interest to be calculated over in years: ") 16 17 SI-(pr* t)+p; 18 CI-p pow((1 r),t); 19 CCI-p pow(E ,(r * t)); 20 21 printf("Simple Interest: %f ", SI); 22 printf("Compound Interest: %f ", CI); 23 printf("Continuously Compounded Interest: %f ", CCI); scanf("%f",at)

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_2

Step: 3

blur-text-image_3

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

What are the advantages of real-time data collection?

Answered: 1 week ago