0% found this document useful (0 votes)
171 views2 pages

PF Assignment 02

Uploaded by

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

PF Assignment 02

Uploaded by

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

University of Management and Technology,

Lahore Campus

Assignment – 02: Fall 2024


Credit
Course Name: Programming Fundamentals Course Code: CC111 4(3,1)
Hours:
Course Instructor/s: Ms. Samra Kanwal Program Name BS Computer Science
Semester/ Section: BSCS, 1st Maximum Marks: 10
Submission Moderator
Dec 01, 2024 at 23:59
Deadline: Signature
Instructions:
 Understanding the problem is a part of the assignment.
 Your assignment should be submitted in PDF format.
 There is a ZERO tolerance policy for plagiarism. Assignments found with copy-pasted material or
copied from fellows will be marked as ZERO.
 Submit your assignments on LMS within the given time frame. Emailed assignments will not be
accepted.
 I can take either quiz or in class viva for this assignment by calling any one from the class.

Question: Develop C++ programs of the following problems [CLO-2]

Q1: Write a program that takes the prices of three grocery items from the user, calculates the
total cost, and adds a fixed sales tax rate. Display the total bill amount.
 Use a fixed sales tax rate of 8%
Q2: Write a program that converts an amount in USD to three other currencies: Euro, Japanese
Yen, and British Pound. The user should input the amount in USD, and the program should output
the converted amounts using predefined conversion rates.
 1 USD = 0.92 Euro
 1 USD = 148.45 Japanese Yen
 1 USD = 0.79 British Pound
Q3: Develop a program that reads the radius of a sphere from the user and calculates the volume.
Use the formula: Volume = (4/3) * π * radius³.
Q4: Write a program that reads three integers representing hours, minutes, and seconds of a
time. Then it should calculate the equivalent time in seconds.
Q5: Develop a program that calculates fuel efficiency. The user inputs the distance traveled (in
kilometers) and the amount of fuel used (in liters), and the program outputs the efficiency in
kilometers per liter.
Q6: Write a program that calculates the discount and final price of a product. The user should
input the original price and the discount rate, and the program should display the discount
amount and the final price.
Q7: Develop a program that calculates the gross and net salary of an employee. The user should
input the basic salary, and the program should compute the gross and net salary using the
following allowances and deductions:
 Allowances:
o House Rent Allowance (HRA): 20% of the basic salary.
o Dearness Allowance (DA): 15% of the basic salary.
 Deductions:
o Provident Fund (PF): 12% of the basic salary.
o Professional Tax (PT): A fixed amount of $200.

Q8: Create a program that calculates the electricity bill based on the number of units consumed.
Ask the user to input the number of units, calculate the bill using a predefined rate per unit, and
display the total amount.

You might also like