I'm supposed to write a code where one function calculates the fare of an Uber ride, and the second one outputs the costs and name. I'm encountering two problems. One: when I run this code my second function doesn't output anything. Two: Would it even be possible to return the fare and the name from the first function? ***Please disregard that it says cout << "Rider name" << fare. I'm simply trying to debug this.
One: when I run this code my second function doesn't output anything.
That's because your second function is never called.
Two: Would it even be possible to return the fare and the name from the first function?
Yes. You can either return a structure containing both bits of information, pass the variables you wish to take on those values via reference (or, if you're taking a c approach, pass the addresses of those variables) or a combination of the two.
However, it is definitely not possible if that function is main since main returning means your program has ended.
Tip: Don't use the same names for functions and other variables. In your code you have a function named fare and two different variables of type double sharing the name.