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

Programming Bazar

The document discusses how to play the card game Tong Its and the requirements to register as a voter in the Philippines. It provides the steps and rules for playing Tong Its, which involves 3 players being dealt cards and drawing from the deck or discard pile. It also lists the requirements to register as a voter as being a citizen of the Philippines who is 18 years old and has completed all registration requirements and has a voter's ID.

Uploaded by

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

Programming Bazar

The document discusses how to play the card game Tong Its and the requirements to register as a voter in the Philippines. It provides the steps and rules for playing Tong Its, which involves 3 players being dealt cards and drawing from the deck or discard pile. It also lists the requirements to register as a voter as being a citizen of the Philippines who is 18 years old and has completed all registration requirements and has a voter's ID.

Uploaded by

what the fvck
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

BAZAR, MARK B.

Choose 2 and write an algorithms and pseudocodes for the following problems:
1. Computing for the Perimeter of a Rectangle using the formula Perimeter is twice the width
and twice the length.
2. Identifying if a person can already register as a voter in the Philippines.
3.Your favorite Board or Card Game.

ANSWERS:
ALGORITHM PSEUDOCODE
HOW TO PLAY TONG ITS

BEGIN
STEP1. Display a set of 52 poker cards. OUTPUT “a set of 52 poker cards”

STEP2. Maximum of only 3 players. 3 players

STEP3. The Banker (b) shuffles the cards. OUTPUT “b shuffles the cards”
STEP4. Banker (b) distributes the cards
alternately. OUTPUT “b distributes the cards alternately”
STEP 5. The Banker (b) receives 13 cards. OUTPUT “b receives 13 cards”
STEP 6. While the player 1 (a) and player 2
(c) will receive 12 cards. OUTPUT “a and c receive 12 cards”
STEP 7. The banker (b) will be the first to
drop 1 card. OUTPUT “b first to drop 1 card”
STEP 8. Player 1 (a), player 2 (c) and Banker
(b) will follow drawing the cards on the deck. IF “a, c and b drawing the cards on the deck”
STEP 9. Player 1 (a), player 2 (c) and Banker
(b) could follow drawing the cards on the IF “a, c and b could follow drawing the cards
dump cards. on dump cards”
STEP 10. The lesser value of left cards will
OUTPUT “a, c and b show all their cards”
be the winner.
END
ALGORITHM PSEUDOCODE
BEGIN
He/she must be a citizen of the Philippines. citizen of the Philippines

He/she must be 18 years old.


18 years old
He/she have all requirements for registration.
complete requirements
He/she have voter’s ID.

have voter’s ID
END

You might also like