I'm trying to make a code to calculate a ride fare, but I'm getting hung up. When i run my program, everything after my if statements doesn't seem to be working. For some reason it just stops after the if statement. Why isn't it using my fare equation to output a fare? Side note: apparently, when finished, this code is supposed to implement two functions, so maybe that's part of the problem?
Line 27: Should use getline(cin, name) so it can read white space for first and last name.
Line 63 and 64: It's a switch statement, so you would not be able to calculate fare since the program breaks after each case. Put it outside your switch statement.