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

Case 1: Aswan Has RM100 in His Pocket. He Bought Two Item With Different Prices. Calculate The Balance That Is Left

The document contains 3 cases for calculating financial amounts based on user inputs. Case 1 calculates balance left after buying 2 items within a RM100 budget. Case 2 calculates an employee's 20% bonus based on their salary. Case 3 calculates the required payment after a 10% discount from the total input price.

Uploaded by

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

Case 1: Aswan Has RM100 in His Pocket. He Bought Two Item With Different Prices. Calculate The Balance That Is Left

The document contains 3 cases for calculating financial amounts based on user inputs. Case 1 calculates balance left after buying 2 items within a RM100 budget. Case 2 calculates an employee's 20% bonus based on their salary. Case 3 calculates the required payment after a 10% discount from the total input price.

Uploaded by

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

_1

Case 1
Aswan has RM100 in his pocket. He bought two item with different prices. Calculate the balance that is left.

Phase
1
To calculate the balance after TWO item are bought within RM100.
2 I:
Price 1, Price 2

P:
1. Amount in hand;
Money = 100

2. Calculate Balance;
Balance = Money - (Price 1 + Price 2)

O:
Display balance;
Balance
_1

Case 2
To calculate the bonus that employee receive from employee input salary given bonus to be of 20% of the salary.

Phase
1 To calculate the bonus from 20% salary

2 I:
salary
P:
1) Calculate Bonus;
Salary=20%

O:
Display Bonus;
Bonus

Case 3
To calculate the total to be paid by the customer after given 10% discount from the total input price from user.

Phase
1 Required payment after 10% discount from user input.
2 I:
(Total Price)
_1

P:
1) Calculate required payment after 10% discount;
Total price= 90%

O:
Display required payment ;
Required payment

You might also like