Ive written these functions but I need a little more descriptive help with the last one
-getDollars: a function that returns the amount in U.S. dollars entered by the user. This function will return a double value. This function is the same as in Part 1.
-usToNZD : a function that takes the amount of U.S. dollars as a parameter and returns the amount in New Zealand dollars. This function will return a double value.
-usToGBP: a function that takes the amount of U.S. dollars as a parameter and returns the amount in British pounds. This function will return a double value.
-usToEuro: a function that takes the amount of U.S. dollars as a parameter and returns the amount in Euros. This function will return a double value.
-printConvertedDollars: a function that takes the US. dollar amount as a parameter, calls the three conversion functions, and prints out the converted amounts.
-------------------------------------------------------------------------------
void printConvertedDollars(double value, double getDollars) //This is the one I need to change //
{
cout << fixed << setprecision(2);
cout << (value * getDollars);
}
You don't want to pass getDollars() as a parameter to usToNZD(), usToGBP, and usToGBP. Instead, you want to call getDollars(), and pass the result to these functions. In other words, your main program might look like this:
1 2 3 4 5
int main()
{
double usd = getDollars("Enter amount in $USD:");
printConvertDollars(usd);
}
I didn't mean the getDollars function. I was talking about your other functions that all has a second parameter named getDollars.
For some reason I forgot to mention that my second line was talking about the printConvertedDollars. What I was trying to say was that the printConvertedDollars function should call the three functions usToNZD, usToGBP, usToEuro, and print the values they return. That's what the instructions tell you do do.