C program to calculate electricity bill using switch case

Explanation
The program first asks the user to enter the number of units used. It then uses a switch statement to calculate the total electricity bill based on the number of units used.
Tariffs are as follows:
The rate for the first 100 units is $1.20 per unit.
For the next 100 units the rate is $2.00 per unit.
For the next 100 units, the rate is $3.00 per unit.
Each additional unit costs $3.50 per unit.
The total bill is calculated based on the rates and displayed to the user.
Finally, return 0 indicates successful execution of the program.


Previous :-->> 6. Write a program in C to check whether a character is a vowel or a consonant using the Switch Case statement .
 -->> NEXT: 8.Create a C program to determine the day of the week based on the input number using switch-case.
-->>ALL Conditionl statements Programs