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

Declare A, B, Wallet, Balance, Total Price: Start

The document outlines a program that allows a user to purchase items. It declares variables for item choice, item selected, wallet amount, balance, and total price. The user selects a category and then chooses an item, entering the quantity. The total price is calculated by multiplying the quantity by the item price, and the balance is the wallet amount minus the total price. This is repeated for multiple purchases, each time displaying the total price and remaining balance.

Uploaded by

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

Declare A, B, Wallet, Balance, Total Price: Start

The document outlines a program that allows a user to purchase items. It declares variables for item choice, item selected, wallet amount, balance, and total price. The user selects a category and then chooses an item, entering the quantity. The total price is calculated by multiplying the quantity by the item price, and the balance is the wallet amount minus the total price. This is repeated for multiple purchases, each time displaying the total price and remaining balance.

Uploaded by

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

Start

Declare a, b, wallet, balance, total price

Enter 1 for Comic

Enter 2 for Novel

Enter 3 for Magazine

Enter 4 for Promotion set

a=1 a=2
YES

NO

Enter 1 for Conan RM 6

Enter 2 for Naruto RM 7

Enter 3 for Marvel RM 7

NO NO

YES YES YES

Conan
b=1 b=2
Naruto Marvel
b=3
YES

option=111
option=111 option=111
YES YES YES

NO NO NO

Quantity, budget
Quantity, budget Quantity, budget
Total price = quantity 6 Total price = quantity 7 Total price = quantity 7

Balance= wallet total price Balance= wallet total price Balance= wallet total price

Total price, Balance Total price, Balance Total price, Balance

Stop
Start

Declare a, b, wallet, balance, total price

Enter 1 for Comic

Enter 2 for Novel

Enter 3 for Magazine

Enter 4 for Promotion set

a=2 a=3
YES

NO
Enter 1 for harry potter RM 90

Enter 2 for Ombak Rindu RM 60

Enter 3 for Kim chi untuk awak rm120

NO NO

YES YES YES

Kim chi untuk


harryb=1
potter Ombak Rindu b=3
awak
b=2
YES

option=111
option=111 option=111
YES YES YES

NO NO NO

Quantity, budget
Quantity, budget Quantity, budget
Total price = quantity 90 Total price = quantity 60 Total price = quantity 120

Balance= wallet total price Balance= wallet total price Balance= wallet total price

Total price, Balance Total price, Balance Total price, Balance

Stop
Start

Declare a, b, wallet, balance, total price

Enter 1 for Comic

Enter 2 for Novel

Enter 3 for Magazine

Enter 4 for Promotion set

a=3 a=4
YES

NO
Enter 1 for K-Pop RM8

Enter 2 for Wisel RM6

Enter3 for Mangga RM9

NO NO

YES YES YES

K-Pop Wisel Mangga


b=3
b=1 b=2
YES

option=111
option=111 option=111
YES YES YES

NO NO NO

Quantity, budget
Quantity, budget Quantity, budget
Total price = quantity 8 Total price = quantity 6 Total price = quantity 9

Balance= wallet total price Balance= wallet total price Balance= wallet total price

Total price, Balance Total price, Balance Total price, Balance

Stop
Start

Declare a, b, wallet, balance, total price

Enter 1 for Comic

Enter 2 for Novel

Enter 3 for Magazine

Enter 4 for Promotion set

a=4
YES

Enter 1 KPOP + DETECTIVE CONAN + OMBAK RINDU 13.51% OFF

Enter 2 WISEL + NARUTO + MARVEL 25% OFF

Enter 3 MANGGA + KPOP + KIMCHI UNTUK AWAK 10.95 % OFF

NO NO

YES YES YES

KPOP + DETECTIVE CONAN + WISEL + NARUTO + MANGGA + KPOP + KIMCHI


OMBAK RINDU 13.51% OFF MARVELb=2
25% OFF UNTUK 10.95 % OFF
b=1 b=3
YES OFFOFFAWAK

option=111
option=111 option=111
YES YES YES

NO NO NO

Quantity, budget
Quantity, budget Quantity, budget
Total price = quantity 66 Total price = quantity 15 Total price = quantity 122

Balance= wallet total price Balance= wallet total price Balance= wallet total price

Total price, Balance Total price, Balance Total price, Balance

Stop

You might also like