Question: How do I turn this C++ code into a hierarchy chart? #include #include #include #include #define MONTHS_IN_YEAR 12 using namespace std; void getUsername(string &username){ cout

How do I turn this C++ code into a hierarchy chart?

#include #include #include #include #define MONTHS_IN_YEAR 12

using namespace std;

void getUsername(string &username){ cout << "Please enter your username:"; getline(cin,username); } void getBalance(double &balance){ cout << "Please enter the current credit card balance:"; cin >>balance; }

void getAPR(double & APR){ cout << "Please enter the APR:"; cin >> APR; }

void getMonthlyPayments(double &monthlyPayments){ cout << "Please enter the monthly payments:"; cin >> monthlyPayments; }

int calculateMonths(double balance,double APR,double monthlyPayments){ double MPR = APR/MONTHS_IN_YEAR; //-log(1 - (Ai/P))/log(1 + i) double month = -1*(log(1 - (balance * MPR/100)/monthlyPayments)/log(1+MPR/100)); return ceil(month); }

int main() { string username; double balance; double APR; double monthlyPayments; int number_of_months; getUsername(username); getBalance(balance); getAPR(APR); getMonthlyPayments(monthlyPayments); cout << fixed << setprecision(3);

cout <<" current credit card balance: "<

return 0; }

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!