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

 Please help the out keeps printing twice #include #include #include #include

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

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!