You are on page 1of 7

Start

Read amountofitem1, 2, 3, 4, 5,6,7,totalamountofitems=0, balance, money as double

Read ans as char

Set totalamountofitem

Display Enter the amount you want to buy

Display PANADOL 1=RM 0.60

Read amountofitem1

totalPrice +=amountofitem1*0.6

Display IODINE 1=RM1.00

Read amountofitem2

totalPrice +=amountofitem2*1.00

Display PARACETAMOL 1=RM1.00

Read amountofitem3

totalPrice +=amountofitem3*1.00

Display SODIUM BICARBONATE 1=RM3.50

Read amountofitem4

totalPrice +=amountofitem4*3.50

Display RAVINENEMA 1=RM2.00

Read amountofitem5

totalPrice +=amountofitem5*2.00

Display BONJELA: 1=RM3.00

Read amountofitem6

totalPrice +=amountofitem6*3.00

Display TAB ALBENDAZOLE 1=RM5.00

Read amountofitem7

totalPrice +=amountofitem7*5.00

Display totalprice

Enter your money

Read money

balance=money-totalPrice

Display balance

End

Display Do you wish to continue (y - Yes | n No)"

Yes

ans !='Y' ans !='y'

NO

ans ='N' ans ='n'

You might also like