Discover answers to your questions with Westonci.ca, the leading Q&A platform that connects you with knowledgeable experts. Discover detailed answers to your questions from a wide network of experts on our comprehensive Q&A platform. Join our platform to connect with experts ready to provide precise answers to your questions in different areas.

Write a function DrivingCost with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar cost to drive those miles. Ex: If the function is called with 50 20.0 3.1599, the function returns 7.89975. Define that function in a program whose inputs are the car's miles/gallon and the gas dollars/gallon (both floats). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your DrivingCost function three times.