BCSL-021 (2022-23) Solved Assignment
BCSL-021 (2022-23) Solved Assignment
in
www.techiya.in
BCA Solved Assignment 2022-23
Course Code : BCSL-021
Course Title : C Language Programming
Assignment Number : BCA(2)/L-021/Assignment/2022-23
Q1. The Electricity Bill Calculator is an application-based micro project that calculates
the month’s electricity bill based on the appliances or loads and units consumed.
People who do not have a technical understanding of calculating power bills can use
this program to forecast/calculate their electricity bills. The application should have
the following features:
To display the Meter Number
To display the previous meter reading
Facility to enter present meter-reading
To display the no. of units consumed
To display the complete Tariff Structure (Domestic, Non-Domestic, Industrial)
Provision to input the no. of units consumed per month
To display the bill-amount payable as per the tariff structure
To display the due date of the payment
Note: Assumptions can be made wherever necessary and list them. You must execute
the program and submit the program logic, sample input and output along with the
necessary documentation for this question.
Ans. Program
#include <stdio.h>
int main()
{
int meterno = 123, conu, curr, past_reading = 1230;
float chg, surchg = 0, gramt, netamt;
printf("\n**************Electricity Bill*************\n");
printf("Enter Consumed unit per month: ");
scanf("%d", &conu);
printf("Amount Charges @Rs. %4.2f per unit :%8.2f\n",chg,gramt);
printf("Surchage Amount :%8.2f\n",surchg);
printf("Net Amount Paid By the Customer :%8.2f\n",netamt);
printf("Due date for payment :18-11-2022");
}
2
www.techiya.in
Output
3
www.techiya.in
4
www.techiya.in