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

Pseducode

The document outlines a movie ticket booking system that allows customers to select movies, ticket types, quantities and calculates subtotals, discounts, and balances due. It collects customer details, runs through selection and payment loops, and provides a receipt with breakdown of tickets, costs, payments and balance.

Uploaded by

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

Pseducode

The document outlines a movie ticket booking system that allows customers to select movies, ticket types, quantities and calculates subtotals, discounts, and balances due. It collects customer details, runs through selection and payment loops, and provides a receipt with breakdown of tickets, costs, payments and balance.

Uploaded by

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

Begin

set payment = 0
set total = 0
set balance = 0
set char amountTickets[5] =("0","0","0","0","0")
set totaltickets= 0
set type = 0
set char price[5] =("30","40","15","8","10")
set char seat[5] =("Standard (2D)","Standard (3D)","Student","Children","Senior
citizen")
set continue = 0
set MovieName[3] =("Frozen", "Ejen Ali", "Sheriff")
set MovieSelect = 0
set discount = 0
set netTotal = 0

get Custname
get email
get phone number

for (int i = 0; i < 5; i++) MovieName[i]


print MovieName[i]
get MovieSelect

While reselect is not 1 THEN

if MovieSelect equal to 1 AND Movieselect equal to 2 THEN

WHILE continue is not equal to 1

amountTickets[type]

print ("1.Standard (2D) RM30")


print ("2.Standard (3D) RM40")
print ("3.Student RM15")
print ("4.Children RM8")
print ("5.Senior citizen RM10")
get type
get amounttickets

calculate total = price[type]*amountTickets[type]


calculate totaltickets = totaltickets + amountTickets[type]

get reselect
get continue

ELSE

BREAK

END WHILE
END IF

if MovieSelect equal to 3 THEN

WHILE continue is not equal to 1


amountTickets[type]

print ("1.Standard (2D) RM30")


print ("2.Standard (3D) RM40")
print ("3.Student RM15")
print ("4.Children RM8")
print ("5.Senior citizen RM10")
get type
get amounttickets

calculate total = price[type]*amountTickets


calculate totaltickets = totaltickets + amountTickets[type]

get reselect
get continue

ELSE

BREAK

END WHILE
END IF
ELSE
set total = 0
set type = 0
for (int i = 0; i < 5; i++) amnountTickets[i] = 0
printf("\nReselect movie title: ")
get movieTitle
continue

END WHILE
printf("\
n========================================================================\n");
printf("\nPROMO! Every purchase that costs RM100 and above will get 10%%
discount!\n");
printf("\
n========================================================================\n");

print("Good day, %s", Custname)

print("\nYou have selected the movie of "%s"\n, MovieName[MovieSelect])

print("\nYou have selected %d movie tickets, which consists of:\n , totaltickets)


for (int i = 0; i < 5; i++) amnountTickets[i] , seat[i], price[i]
print("Quantity\tType\tOriginal Price(RM)")
print("\n==========================\n")
print("\n%d\t%s\t%d\n, amnountTickets[i] , seat[i], price[i])
print("\n==========================\n")

print("\nThe tickets total amount is RM%d\n, total)

if total equal or greater then 100 THEN

calculate discount = total/0.01


calculate netTotal = netTotal-discount
print("\nYou have spent more than RM%d. Discount 10% → RM %d\n,total, discount)
print("\nNet total: Please pay RM%d\n", netTotal)
print("\nInsert your pay:\n ")
get payment

WHILE payment lower then netTotal THEN

calculate netTotal = netTotal-payment


print("\nYou have just paid RM%d\n,payment)
print("\nYou still need to pay another RM%d\n", netTotal)
print("\nInsert your pay:\n ")
get payment

ELSE

calculate netTotal = netTotal-payment


calculate balance = balance+payment
print("\nYou have just paid RM%d\n,payment)
print("\nYour outstanding balance is RM%d\n,balance)

END WHILE
ELSE

print("\nNet total: Please pay RM%d\n", netTotal)


print("\nInsert your pay:\n ")
get payment

WHILE payment lower then netTotal THEN

calculate netTotal = netTotal-payment


print("\nYou have just paid RM%d\n,payment)
print("\nYou still need to pay another RM%d\n", netTotal)
print("\nInsert your pay:\n ")
get payment

ELSE

calculate netTotal = netTotal-payment


calculate balance = balance+payment
print("\nYou have just paid RM%d\n,payment)
print("\nYour outstanding balance is RM%d\n,balance)

END WHILE
END IF

print("\nThank you and enjoy your movie ☺\n")


print("\nPress ENTER to exit the system.")
END

You might also like