Answer:
#include <iostream>
using namespace <std>;
double calcTuition(double units, double studentFees);
void output(double total);
int main{
double unitCost, schoolFees, total;
cin >>"Enter unit cost: " >> unitCost;
cin >>"Enter school fees: " >> schoolFees;
total = calcTuition( unitCost, schoolFees );
output( total );
}
double calcTuition(double units, double studentFees){
return unit * studentFees;
}
void output(double total){
cout << " Total: " << total;
}
Explanation:
The C++ console source code prints out the total cost of a student's tuition. The student is prompted to input the units and the school fees and the total is displayed excluding parking fees.
The following code will program that prompts the user to enter the num- ber of hours a car is parked at the airport and outputs the parking fee.
<u>Explanation:</u>
Code:
#include<iostream>
using namespace std;
int main()
{
float hours;
cout <<"Enter number of hours a car parked at the airport: "; // prompt the user to enter hours.
cin >> hours ; // strong the hours
if (hours > = 0 && hours < =3 ) // if 0 < = h < = 3
cout << "Parking fee: 5"; //printing parking fee is 5.
else if (hours > 3 && hours < = 9)//if 3 < h < = 9
cout<<"Parking fee: "<<6*int(hours);//converting float value to int the multiplying with 6 then printing fee.
else//if 9 < h < = 24
cout<< "Parking fee: 60";// printing parking fee 60.
return 0;
}
Answer:
is a chart that allows the reader to follow a particular path and arrive at an outcome.
Explanation:
A decision tree is a chart i.e tree like diagram that allow a user to make choice on the option to partake in. Decision trees are also used for classification and for making process
The decision tree usually have a root as the node. Then each option/decision is represented as a branch out extending from the previous node.
For Instance, when a coins is toss three times; a decision tree gives us the possible path that is available to choose from.