Question: 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

 Use switch Case statement as my roll no is odd Program

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!