Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago