This is a C-based console application that simulates a simple energy billing system for residential users. It allows up to 20 clients to register, track their monthly energy consumption (in kWh), calculate charges, and make payments based on their usage.
-
π User Sign-up & Login System
- Creates a unique username based on the surname (e.g.,
smith123
) - Password-based login authentication
- Creates a unique username based on the surname (e.g.,
-
π Monthly Consumption Tracking
- Users input their monthly kWh consumption
- Calculates energy cost based on consumption range:
- Up to 1600 kWh β β¬0.005 per unit
- 1601β2000 kWh β β¬0.008 per unit
- Above 2000 kWh β β¬0.009 per unit
- Cost is weighted by days in each month (e.g., February has 28 days)
-
π³ Payment System
- Displays calculated cost per month
- Allows the user to pay for any unpaid month (must input the exact amount)
- Marks each month as "paid" upon successful payment
-
π Most Expensive Month
- Identifies the month with the highest paid energy bill
-
π οΈ Edit User Details
- Allows users to update their address and home size
The system is entirely command-line based and consists of structured menus. Each userβs data is stored in memory using struct
, and energy cost is stored in a 2D array.
Data is not persistent (not saved to files), so all progress resets on restart.