Spring 2025_CS201_1
Spring 2025_CS201_1
1 Total Marks: 20
nd
Semester: Spring 2025 Due Date: 2 May, 2025
Instructions
Please read the following instructions carefully before submitting the assignment solution:
It should be clear that your assignment will not receive any credit/marks if:
Recommended Tools
Dev C++
Topics Covered
switch statements
Loops
For good marks use all topics given above for the solution of the assignment.
You must submit only the ".cpp" file of your code on the assignments interface from your LMS account.
An assignment submitted in any other format will not be accepted and will receive zero marks. No excuses will be accepted for submitting a solution file in any other
format.
Problem Statement:
Write a C++ program that uses items price from a menu and your VU ID to calculate the total and net bills according to the requirements given below.
Requirement Instructions:
You are required to Hard-Code your own name and VU ID (e.g., BS123456789) & display it afterwards.
Now, you have to ask a user to enter the numeric part of VU ID.
Extract and display 5 digits from the middle of the numeric part asked in the above step:
o Remove 2 digits from the left and 2 from the right of the 9-digit number.
Each digit of 5 digits extracted in the above step (e.g., 34567) will be used as the quantity for a specific menu item:
o The leftmost is the 1st digit and the rightmost is the 5th digit.
The price of each menu item should be the same as shown in the sample output screenshot below.
Multiply each menu item price by its designated quantity to calculate the total bill.
o Item name
o Unit price
If the total bill is greater than or equal to Rs. 5000, apply a 10% discount.
o Discount amount
Note: Remember that if you have not used your name and student id in the program your marks will be deducted.
Sample Output:
Lectures Covered: Lecture # 1 – 8