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:
Sorry but it donest show the picture
Explanation:
The INPUT code of the given programme in Java would be as given below:
In this first we are taking input of two integers j and k from the user and then performing the required operations over it
import java.util.
Scanner; public class LabProgram {
public static void main(String[ ] args) {
Scanner scnr = new Scanner(System.in);
int i,j;
i = scnr.nextInt();
j = scnr.nextInt();
if(i<=j) {
int k = i;
while (k <= j) {
System.out.print(k + " ");
k = k + 5;
}
System.out.println();
}
else{
System.out.println("Second integer can't be less than first.");
}
}
}
Learn more about Java Programming here:
brainly.com/question/18554491
#SPJ10
Answer
Hi,
The chief contribution of philosophy to artificial intelligence is the knowledge of the connections between the two and the understanding of the shared concept.
Explanation
Philosophy and Artificial intelligence has a close scientific connection because they both share concepts such as action, consciousness, epistemology and free will. From the artificial intelligence perspective, theories in philosophy are important in AI as long as they provide the basis of the designs, reasons and plan. The concepts shared in AI con tribute to the realization of the philosophy of artificial intelligence.
Hope this Helps!

There are three dimensions of information systems
- organizational
- management
- technology.
