Just realize that i need to submit the assignment in 3 days time and my brother getting married tomorrow. Really don't have time to do my assignment. Appreciate if anybody can help. Just a simple C programming for both questions below are really much helpful... Really2 need help...
Write a C program that will calculate and print out the 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 use, and a code of i means industrial use. Any other codes should be treated as an error. The water rates are computed as follows:
- Code h: RM5.00 plus RM0.0005 per gallon used
- Code c: RM1000.00 for the first 4 million gallons used and RM0.00025 for each additional gallon
- Code i: RM1000.00 if usage does not exceed 4 million gallons; RM2000.00 if usage is more than 4 million gallons but does not exceed 10 million gallons; and RM3000.00 if usage exceeds 10 million gallons
Your program should prompt the user to enter an account number (type int), the code (type char) and the gallons of water used (type double). Your program should echo the input data and print the amount due from the user.
Bunyan Lumber Company needs to create a table of the engineering properties of its lumber. The dimensions of the wood are given as the base and the height in inches. Engineers need to know the following information about lumber:
The owner makes lumber with base sizes of 2, 4, 6, 8 and 10 inches. The height sizes are 2, 4, 6, 8, 10 and 12 inches. Produce a table with appropriate headings to show these values and the computed engineering properties. The first part of the table’s outline is shown as follow:
Lumber Size Cross-Sectional Area Moment of Inertia Section Modulus 2 x 2 2 x 4 2 x 6 2 x 8 2 x 10 2 x 12 4 x 2 4 x 4 . . .