Answer:
#include <iostream>
#include<iomanip>
using namespace std;
double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)
{
double dollarCost = 0;
dollarCost = (dollarsPerGallon * drivenMiles) / milesPerGallon;
return dollarCost;
}
int main()
{
double miles = 0;
double dollars = 0;
cout << "Enter miles per Gallon : ";
cin >> miles;
cout << "Enter dollars per Gallon: ";
cin >> dollars;
cout << fixed << setprecision(2);
cout << endl;
cout << "Gas cost for 10 miles : " << DrivingCost(10, miles, dollars) << endl;
cout << "Gas cost for 50 miles : " <<DrivingCost(50, miles, dollars) << endl;
cout << "Gas cost for 400 miles: "<<DrivingCost(400, miles, dollars) << endl;
return 0;
}
Explanation:
- Create a method definition of DrivingCost that accepts three input double data type parameters drivenMiles, milesPerGallon, and dollarsPerGallon and returns the dollar cost to drive those miles
.
- Calculate total dollar cost and store in the variable, dollarCost
.
- Prompt and read the miles and dollars per gallon as input from the user
.
- Call the DrivingCost function three times for the output to the gas cost for 10 miles, 50 miles, and 400 miles.
Answer:
A computer is a machine that can be programmed to manipulate symbols.
Explanation:
Following are the features of PC (computer)
Processor
speed
reliability
accuracy
automation
diligence
consistency
Random access memory (RAM)
Operating system
Graphics adapter and video RAM
Monitor
Answer:
oysters
Explanation:
oysters form pearls inside their mouths, it's a very long process, and most oysters never finish or do them
please give brainliest
Edit your profile, click preferences, and then there should be a drop down that has your level on it which you can change.
Rajesh might want to avoid the use of a web app for the project due to connectivity issues. Hence, one reason he might want to avoid using the Webb app is slow or poor internet connection.
Collaborating on a web application relies very heavily on network connectivity which is the what establishes the link ms allows the apllications to achieve optimum performance.
Therefore, slow internet connection is a major reason whuhe might want to avoid using a web app.
Learn more : brainly.com/question/25531734