Answered step by step
Verified Expert Solution
Question
1 Approved Answer
double calculate _ bill ( char * in _ file, char * customer ) ; This function will open the file named in file, read
double calculatebillchar infile, char customer;
This function will open the file named in file, read the data, and calculate and return the
bill of the customer specified by customer. In case of errors, your function should return an
appropriate error code as described in section
The formula to calculate the bill b per row is given by
b n s x t
where n is the network usage in megabytes, s is the storage usage in blocks, x is the number of
servers used, and t is the number of hours the service is run. The bill is simply the sum of the
bills of each relevant row.
For example, for the input file
Science
Engineering
Science
for customer Science, the total bill is
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started