Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help the out keeps printing twice #include #include #include #include #include using namespace std; /** * Function to calculate the future value and return

image text in transcribed

Please help the out keeps printing twice

#include #include #include #include #include using namespace std;

/** * Function to calculate the future value and return the same */ double calculateFutureValue(double presentValue, double interestRate, int months) { double futureValue = (double)presentValue * pow((1 + interestRate), months); return futureValue; } /** * Function to read the input file and assign the value to the variables */ unsigned int readfile(ifstream &inF, double &presentValue, double &interestRate, int &months) { inF >> presentValue; inF >> interestRate; inF >> months; if (presentValue > infile; ifstream inF; inF.open(infile.c_str()); if (!inF) { cout Input input2.Lxt Puture Value Prsent Value Monthly Intereat Month 0.4248 Your output 12203.06 10000.00 06-11 0000 . 00-wo. 424148e Expected output 12205.06 Puture Value Pesent Value Monthly Interest Honths 10000 00 0.42 48 2: Compare output 0/10 Output differs. See highlights below. Special character legend Input input3.txt -10000 1.1 48 One or moze of the abovo values are not greater than zoo 10000 -1 12 One or more of the above values are not greater than zero One or more of the above values are not greater than zerO One or more of the abo Your output 10000 1.1 reater zero One or more of the above values are not greater than zero -10000,00 1.10 One or more of the above values are not greater than zero 10000.00 -1,00 12 One or more of the above values are not greater than zero Expected output 100002081,180 One OL liore uf the abov values, are no? greater than zero 000 0.00 One or more of the above values are not greater than zero

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 And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions