Question
C/C++ ELECTRIC BILL LAB REPORT 1) Enter your name, student ID, platform (Mac or PC) and date Name and StudentID: Class: CIS054 C/C++ Programming Platform
C/C++ ELECTRIC BILL LAB REPORT
1) Enter your name, student ID, platform (Mac or PC) and date
Name and StudentID:
Class: CIS054 C/C++ Programming
Platform (Mac or PC): Language (C or C++):
Date:
OBJECTIVES:
Use if...else if...else statements to compare numeric values Use Exception Handling in a C++ program to process unexpected or illegal inputs. Use error processing in a C program to process unexpected or illegal inputs. Refer to the lecture
PROJECT DESCRIPTION:
Create a program that does the following:
1) Read the number of kWh used by the customer
2) compute the Electric Bill with a lower rate for the baseline kWh and a higher rate for kWh over the baseline 3) display the Electric Bill If writing your program in C++, you must use TryThrowCatch Exception Handling to process unexpected or illegal inputs. If writing your program in C, you must test the return from scanf to process input errors. Refer to the FAQ links in the lecture section on Canvas
Input kWh from user, convert to double
Determine Base_kWh (up to 500)
Determine Extra_kWh (over 500)
Base_Bill = Base_kWh * 0.27
Extra_Bill = Extra_kWh * 0.55
Electric_Bill = Base_Bill + Extra_Bill
Display Electric_Bill
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