Computer Programming
BEE- 61 D
Assignment#: 2 [CLO 2, C3 – Apply]
1. Submission Guidelines:
a. The assignment has to be done individually. Deadline: Tuesday 3rd May 2025
b. The assignment is of 10 marks.
c. ZERO marks for plagiarism.
Instructions:
Write a program in C++ to solve the following two real-world problems. You must
demonstrate the use of sequence, selection, and repetition constructs in each problem. Include
proper comments and documentation.
Problem 1: Electricity Bill Calculator
Problem Statement:
Design a program that calculates the monthly electricity bill based on the following tariff:
For the first 100 units: Rs. 5/unit
For the next 100 units (101-200): Rs. 7/unit
Above 200 units: Rs. 10/unit
If the total bill exceeds Rs. 1000, apply a surcharge of 10% on the total bill.
Requirements:
Use sequence for input/output and calculations.
Use selection to apply appropriate tariff and surcharge.
Use repetition to allow the user to calculate bills for multiple customers.
Problem 2: Student Grade Report
Problem Statement:
Design a program that:
Accepts marks of 5 subjects for a student.
Calculates the total and average marks.
Determines the grade based on the average:
o 90 and above: A+
o 80–89: A
o 70–79: B
o 60–69: C
o Below 60: F
Requirements:
Use sequence to perform input and computations.
Use selection to assign grades.
Use repetition to input marks for multiple students.
BEST OF LUCK