service { const html Welcome =

Welcome to PetsOvernight on-line store

Delivering Little Bundles of Love, in a box, directly to your door.

Forget about flowers. Send a real live present that shows how much you love someone.
Everyone loves kittens! A grieving widow can be consoled by a new puppy in her life!
For the man who has everything, what about a white rhino for the living room?
Or a miniature Pekinese fighting bitch?
If it's got a central nervous system, we've got it ready to go in a box to your house. ; const html Items =

PetsOvernight

Delivering Little Bundles of Love, in a box, directly to your door.

<[msg]>
Order form:
Items In-Stock Order
<[itemName1]> <[itemQty1]>
<[itemName2]> <[itemQty2]>
<[itemName3]> <[itemQty3]>



Leave this site without a purchase ; const html AddItems =

PetsOvernight

Delivering Little Bundles of Love, in a box, directly to your door.

Form to add some pets into stock:
Items In-Stock Add
<[itemName1]> <[itemQty1]>
<[itemName2]> <[itemQty2]>
<[itemName3]> <[itemQty3]>



Leave this site without a adding new pets ; const html ThankYou = Your order received. Some pets will be shipped tonight
Thank you for choosing PetsOvernight
Good-bye. ; const html ByeBye = Thanks for visiting PetsOvernight
Good-bye. ; string itemName1, itemName2, itemName3; int itemQty1, itemQty2, itemQty3; session Init() { itemName1 = "Bengals Kittens"; itemQty1 = 54; itemName2 = "Chinese Shar Pei"; itemQty2 = 71; itemName3 = "Pot-bellied Pig"; itemQty3 = 25; exit ByeBye; } session Add() { string quit; int itemAmt1, itemAmt2, itemAmt3; itemAmt1 = 0; itemAmt2 = 0; itemAmt3 = 0; show plug AddItems[itemName1=itemName1, itemQty1=itemQty1, itemName2=itemName2, itemQty2=itemQty2, itemName3=itemName3, itemQty3=itemQty3] receive[itemAmt1=itemAmt1, itemAmt2=itemAmt2, itemAmt3=itemAmt3, quit=quit]; if (quit!="Y") { itemQty1 = itemQty1 + itemAmt1; itemQty2 = itemQty2 + itemAmt2; itemQty3 = itemQty3 + itemAmt3; } exit ByeBye; } session Shop() { bool success; string msg, quit; int itemAmt1, itemAmt2, itemAmt3; itemAmt1 = 0; itemAmt2 = 0; itemAmt3 = 0; success = false; msg = ""; show Welcome; while (success==false) { show plug Items[msg=msg, itemName1=itemName1, itemQty1=itemQty1, itemName2=itemName2, itemQty2=itemQty2, itemName3=itemName3, itemQty3=itemQty3] receive[itemAmt1=itemAmt1, itemAmt2=itemAmt2, itemAmt3=itemAmt3, quit=quit]; if (quit=="Y") { success=true; } else { if (itemAmt1<=itemQty1 && itemAmt2<=itemQty2 && itemAmt3<=itemQty3) { itemQty1 = itemQty1 - itemAmt1; itemQty2 = itemQty2 - itemAmt2; itemQty3 = itemQty3 - itemAmt3; success = true; } else { msg = "We are out of stock of one or more items"; } } } if (quit=="Y") { exit ByeBye; } else { exit ThankYou; } } }