The goal of these functions in the end is to show someone's total fee's for being consulted, which is based off whether or not they have a low income. The functions are supposed flow downwards to get each needed value in order to calculate the total. I do not understand how to fix the various errors in my code, such as some variables not being declared in a specific scope, even though I thought i declared them correctly.
#include <iostream>
using namespace std;
const double HighIncomeRate = .7;
const double LowIncomeRate = .4;
bool isLowIncome();
int main() {
double Fee;
double ConsultTime;
cout << "Your fee is: " << getcalcFee(consultTime, Income) << endl;
return 0;
}
bool isLowIncome() {
double Income;
cout << "What is your income: " << endl;
cin >> Income;
cout << "How long have you been consulted" << endl;
cin >> ConsultTime;
if (Income <= 25000) {
return true;
} else {
return false;
}
}
double calcFee(int &ConsultTime, const double HighIncomeRate,
const double LowIncomeRate) {
if (isLowIncome == true) {
if (ConsultTime <= 30) {
calcFee = 0
} else {
calcFee = LowIncomeRate * 50((ConsultTime - 30) / 60)
}
}
if {
if (ConsultTime <= 20) {
calcFee = 0
} else {
calcFee = HighLowRate * 50((ConsultTime - 20) / 60)
}
}
return 0;
}