112k views
3 votes
1) Input - to be done in main() Prompt the user for and input the number of units. Prompt the user for and input the amount for student fees. 2) Calculate the total (do not consider parking) Unit cost should be given as a

User Rnevius
by
6.4k points

1 Answer

3 votes

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;

}

Step-by-step 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.

User IStornZ
by
5.3k points