Answer:
hope this helps if not srry
Answer:
#include <iostream>
using namespace std;
double DrivingCost(int drivenMiles,double milesPerGallon,double dollarsPerGallon)
{
double dollarsperMile=dollarsPerGallon/milesPerGallon;//calculating dollarsperMile.
return dollarsperMile*drivenMiles;//returning thr driving cost..
}
int main() {
double ans;
int miles;
cout<<"Enter miles"<<endl;
cin>>miles;
ans=DrivingCost(miles,20.0,3.1599);
cout<<ans<<endl;
return 0;
}
Output:-
Enter miles
10
1.57995
Enter miles
50
7.89975
Enter miles
100
15.7995
Explanation:
In the function first I have calculated the dollars per mile and after that I have returned the product of dollarspermile and driven miles.This will give the cost of the Driving.
Answer:
Bus Topology
Explanation:
In local area networks (LANs), Bus topology is used to connect all the computers on the single cable. This cable is called backbone of the network. In this type of network when a computer sends data, it will be received on entire network.
For Example
In water line system, all the taps that are connected to single pipe. If the pipe or a single tap broken this will affect the whole system.
Entire system can be crash if any node or wire will break.