1
Smart Electricity Bill Management System
Algorithm, Flowchart, Logic, and Implementation Analysis
Project Presentation
2
Project Concepts & Logic
The core logic relies on classifying consumers into 'Domestic' or 'Commercial' categories.
Key Concepts:
• Structures (struct): Used to aggregate mixed data types (ID, Name, Readings) for each consumer.
• Conditional Logic: Distinct slab rates applied based on connection type.
• Tiered Pricing: Rate per unit increases as consumption bands increase (e.g., 0-100 units vs >200 units).
Key Concepts:
• Structures (struct): Used to aggregate mixed data types (ID, Name, Readings) for each consumer.
• Conditional Logic: Distinct slab rates applied based on connection type.
• Tiered Pricing: Rate per unit increases as consumption bands increase (e.g., 0-100 units vs >200 units).

3
Algorithm: Initialization & Input
- Start: Initialize program and define 'struct Bill'.
- Setup: Set consumer count to 5.
- Loop: Iterate through each consumer.
- Input: Read Name, ID, Meter No, Previous & Current Readings.
- Configuration: Read connection type (Domestic/Commercial).
4
Algorithm: Calculation & Output
- Compute Units: Current Reading - Previous Reading.
- Check Type: If Domestic, apply lower slab rates; else apply Commercial rates.
- Apply Charges: Add fixed charges and tax percentage to base amount.
- Repeat: Continue loop for all consumers.
- Display: Print final bill report for all users.
5

Flowchart Structure
The logical flow of the system:
1. Input Phase:
Read Customer Name, Connection Type (Domestic/Commercial), and Units Consumed.
2. Processing:
Calculate base bill using the tiered slab rates defined in the code.
3. Surcharge Application:
If the total bill exceeds Rs. 500, apply a 5% extra surcharge.
4. Output:
Display final bill amount with details.
1. Input Phase:
Read Customer Name, Connection Type (Domestic/Commercial), and Units Consumed.
2. Processing:
Calculate base bill using the tiered slab rates defined in the code.
3. Surcharge Application:
If the total bill exceeds Rs. 500, apply a 5% extra surcharge.
4. Output:
Display final bill amount with details.
6
Code: Data Structure Definition
The foundational setup includes library imports and the structure definition:
#include <stdio.h>
#include <string.h>
struct Bill {
char name[30];
char type[15]; // "domestic" or "commercial"
int units;
float amount;
};
7
Code: Calculation Logic
The calculation logic handles different rates for domestic and commercial users:
float calculateBill(int units, char type[]) {
float bill = 0.0;
if (strcmp(type, "domestic") == 0) {
if (units <= 100) bill = units * 1.50;
else if (units <= 200) bill = 150 + (units - 100) * 3.00;
else bill = 150 + 300 + (units - 200) * 5.00;
} else { // Commercial Rates
if (units <= 100) bill = units * 4.00;
else if (units <= 200) bill = 400 + (units - 100) * 6.00;
else bill = 400 + 600 + (units - 200) * 8.00;
}
return bill;
}
8
Code: Main Execution
The main function coordinates input, processing, and output:
int main() {
struct Bill b;
printf("Enter Name, Type (domestic/commercial), Units: ");
scanf("%s %s %d", b.name, b.type, &b.units);
// Calculate Bill
b.amount = calculateBill(b.units, b.type);
// Apply Surcharge if Bill > 500
if (b.amount > 500) {
b.amount += b.amount * 0.05; // 5% Surcharge
}
printf("\nCustomer: %s\nTotal Bill Amount: Rs. %.2f\n", b.name, b.amount);
return 0;
}
9
Output Analysis: Bill Comparison
Comparison of final electricity bills for 5 consumers. Commercial users (Mahesh, Kavya) show significantly higher bills due to higher slab rates and consumption.
Key Data Points:
- Ramesh (Domestic): Rs. 315.00
- Kavya (Commercial): Rs. 1758.75
10
Detailed Output Report
- Consumer 1 (Ramesh):
Domestic connection, 120 units consumed.
Bill: Rs. 315.00 - Consumer 3 (Mahesh):
Commercial connection, 250 units consumed.
Bill: Rs. 1322.50 - Consumer 4 (Anita):
Domestic connection (Low Usage), 90 units.
Bill: Rs. 192.38 - Observation: Commercial rates create a steep increase in billing for similar consumption levels.
11
"The smart electricity bill management system effectively demonstrates the use of structured programming, conditional logic, and iterative processing to automate utility billing for different consumer categories."
- Conclusion
Smart Electricity Bill Management System
Algorithm, Flowchart, Logic, and Implementation Analysis
Project Presentation
Made withbobr.ai
1 / 11