Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PROGRAM ShoppingChart

START

STORE "Cart" as string with 0
STORE "Total price" as number with 0

SHOW "Shop page"
READ INPUT "Choosen product"
SHOW "Choosen product"
READ INPUT "Amount of choosen product"
READ INPUT "Product add to cart"
STORE "Cart" with "Choosen product"
STORE "Total price" WITH "Amount of choosen product" TIMES "Product price"
SHOW "Cart page"

IF "Go to checkout" EQUAL "Yes"
DISPLAY FORM Payment
DO READ "payment"
VALIDATE "payment"
IF "payment" IS "Yes"
PRINT "Payment successfully"
ELSE
BACK TO DISPLAY FORM Payment
ELSE
BACK TO "Cart page"

END