Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use switch Case statement as my roll no is odd Program must be in C language not in C++ Please Must use USER DEFINE FUNCTION

image text in transcribed

Use switch Case statement as my roll no is odd

Program must be in C language not in C++

Please Must use USER DEFINE FUNCTION for calculating surcharge

Construct a program to calculate the electricity bill. The rates of electricity per unit are as follow: If the units consumed are equal or less than 100, then the cost is Rs. 2/- per unit. If the units consumed are more than 100 or less than equal to 200, then the cost is Rs. 2.5/- per unit. If the units consumed are more than 200 or less than equal to 300, then the cost is Rs. 3/- per unit. If the units consumed are more than 300, then the cost is Rs. 3.5/- per unit and surcharge of 5% of bill is added. (Use user-defined function for calculating surcharge). Implement the program by using switch case (for odd roll number students) and if-else ladder (for even roll number students)

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

Step: 3

blur-text-image

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

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

Students also viewed these Databases questions

Question

=+Are the contracts enforceable?

Answered: 1 week ago