Question: 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.

Interest Comparison, can someone look at my code and see where i

My code:

went wrong? My output doesn't match the grading output. My code: Output

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!