0% found this document useful (0 votes)
13 views

Spring 2025_CS201_1

This assignment for CS201 requires students to write a C++ program that calculates total and net bills based on menu item prices and a user-provided VU ID. Students must hard-code their name and VU ID, extract specific digits from the numeric part of the VU ID for item quantities, and display detailed billing information. The assignment is due on May 2, 2025, and must be submitted in '.cpp' format to receive credit.

Uploaded by

lohar67261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Spring 2025_CS201_1

This assignment for CS201 requires students to write a C++ program that calculates total and net bills based on menu item prices and a user-provided VU ID. Students must hard-code their name and VU ID, extract specific digits from the numeric part of the VU ID for item quantities, and display detailed billing information. The assignment is due on May 2, 2025, and must be submitted in '.cpp' format to receive credit.

Uploaded by

lohar67261
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment No.

1 Total Marks: 20

nd
Semester: Spring 2025 Due Date: 2 May, 2025

CS201 – Introduction to Programming Syllabus: Lectures 1 to 8

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:

 The assignment is submitted after the due date.

 The submitted assignments do not open or the file is corrupt.

 The assignment is copied (from the internet or other students).

Recommended Tools

 Dev C++

Topics Covered

 Variables (int, float, string)

 Arithmetic operators (+, *, %, /)

 if-else conditional logic

 switch statements

 Loops

For good marks use all topics given above for the solution of the assignment.

Assignment Submission Instructions

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.

For any queries related to the assignment, please contact [email protected].

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.

o For example, from 123456789, you will extract 34567.

o 12 from the left and 89 from the right will be removed.

 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.

o Digit 1 should be used for the quantity of Burger.

o Digit 2 should be used for the quantity of Pizza.

o Digit 3 should be used for the quantity of Fries.

o Digit 4 should be used for the quantity of Sandwich.

o Digit 5 should be used for the quantity of Cold Drink.

 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.

 Display the full billing details for each item including:

o Item name

o Quantity (from digit)

o Unit price

o Subtotal (quantity × price)

o Sample is shown in screenshot

 After processing all 5 items, calculate the total bill.

 If the total bill is greater than or equal to Rs. 5000, apply a 10% discount.

 Display the following at the end:

o Total before discount

o Discount amount

o Final payable amount

o Sample is shown in screenshot

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

You might also like