C Programming and Makefiles

Due: 5:00am, Wednesday, September 3, 2025

Computer Science I Project Description

Write a program that will calculate and print out bills for the city water company. The water rates vary, depending on whether the bill is for home use, commercial use, or industrial use. A code of h means home use, a code of c means commercial user, and a code of i means industrial use. Any other code should be treated as an error. The water rates are computed as follows:

Code h:

Code c:

Code i:

Your program should accept an account number, the code, and the gallons of water. Your program should echo the input data and print the amount due from the user.

The program MUST utilize functions and MUST contain at least one if statement and at least one switch statement.

Specifications

Implementation Notes

Turning in the Assignment

For this assignment, you must turn in a zip file of a directory named project0 containing the appropriate files.

Submit the zip file to the appropriate folder on D2L.