Answered step by step
Verified Expert Solution
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
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
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