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:
valuable; rare
Explanation:
A valuable capability is that which gives a firm some competitive advantage. Core competencies are the operational activities that a company does best. A business’s core competencies are what distinguish it from other rival companies in its industry. While Rare capabilities are capabilities that a small amount of, if any, competitors possess. Those type of capabilities that are costly or impossible to imitate.
from the above explanation we can deduce that the modern technology implementation in the airline industry has made it possible to have valuable ptograms and softwares for carring out several task which are no longer scarce to procure.
The second last one is the answer i think
Answer:
Explanation:
a = input("what kind of pet the user has")
if a == 'cat':
print("Too bad")
elif a == 'dog':
print("Lucky you!")
Answer:
strr=input("please enter something: ")
while strr is not "":
print(strr)
strr=input("please enter something: ")
Explanation:
whenever the user will enter an empty string the loop will terminate