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

Assignment 2

Uploaded by

lucifer0786c
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Assignment 2

Uploaded by

lucifer0786c
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Application of information and communication technology, V9, Assignment 2

University of management and Technology


Name: ------------------------------ Session: Fall 2024
Roll No: ---------------------------- Total Marks: 30

AICT V9, (CLO 2)

Question # 1:

Write an algorithm and draw a flow chart to print a receipt from a medical store by entering
medicine names and prices from the cashier. Add up to 5 medicines. Apply a 5% discount on
the final total and display the receipt in the given format.

ABC Store
01-11-2024
Receipt ID: 123456
Name of Medicine 1………………………………. 400
Name of Medicine 2…….………………………... 200
Name of Medicine 3………………………………. 400
Name of Medicine 4……………………………….. 200
Name of Medicine 4……………………………….. 350
Total Amount...…………………………………….. 1550
Discount …………………….……… 5%
Total........................………………………………1472.5
Application of information and communication technology, V9, Assignment 2

Question # 2:

Write an algorithm and flowchart to solve the following problem:

1. Ask the user to input a number of seconds.


2. Analyze the entered number and

1. If the number of seconds is greater than or equal to 86,400, calculate and


display how many days are in that many seconds.
2. If the number of seconds is greater than or equal to 3,600 but less than 86,400,
calculate and display how many hours are in that many seconds.
3. If the number of seconds is greater than or equal to 60 but less than 3,600,
calculate and display how many minutes are in that many seconds.
3. If the number of seconds is less than 60, the program should not display any conversion
but simply indicate that the entered value is less than one minute.

Question # 3:

Write an algorithm and draw a flow chart.


Geometry Calculator
 Calculate the Area of a Circle
 Calculate the Area of a Rectangle
 Calculate the Area of a Triangle
 Quit
Enter your choice (1-4):
If the user enters 1, the program should ask for the radius of the circle and then display its area.
Use the following formula:
area = πr2
Use 3.14159 for π and the radius of the circle for r. If the user enters 2, the program should ask
for the length and width of the rectangle and then display the rectangle’s area. Use the
following formula:
area = length * width
If the user enters 3 the program should ask for the length of the triangle’s base and its height,
and then display its area. Use the following formula:
area = base * height * 0.5
If the user enters 4, the program should end.
Application of information and communication technology, V9, Assignment 2

Question # 4:

Write an algorithm and draw a flow chart.


A software company sells a package that retails for $99. Quantity discounts are given according
to the following table.

Quantity Discount
10–19 20%
20–49 30%
50–99 40%
100 or more 50%

Apply the discount logic based on the quantity entered by the user.
Analyze the quantity entered and:
A. If the quantity is between 1 and 9, no discount is applied.
B. If the quantity is between 10 and 19, a 20% discount is applied.
C. If the quantity is between 20 and 49, a 30% discount is applied.
D. If the quantity is between 50 and 99, a 40% discount is applied.
E. If the quantity is 100 or more, a 50% discount is applied.
Calculate the total cost after applying the appropriate discount.
Identify the final price the customer will need to pay after the discount is applied.
Solve the problem and display the original price, the discount amount, and the final price.

You might also like