Prog4 - CSc 252 Program 4 Version 1.0 Programs 4: Full...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Program 4 Version 1.0 1 of 5 Programs 4: Full House Program due: Thursday, November 10th, 11:59p.m. You are to complete a program by providing a fullHouse function. The fullHouse function will be given the address of a string of 8 characters. The first seven characters will represent playing cards. The 8th character will be the nul character that marks the end of the string. The fullHouse function will determine if the 7 playing cards contain a full house. A full house is defined as 3-of-a-kind and 2-of-a-kind, where the 3-of-a-kind use different cards from the 2- of-a-kind. The 5 cards that make up the full house can come from any appropriate combination of the 7 cards. To represent the cards using single characters, we will use the following convention: The digits 2 through 9 will represent the cards 2 through 9. The digit 0 will represent a 10. The letter J will represent a Jack. The letter Q will represent a Queen. The letter K will represent a King. The letter A will represent an Ace. Here are some examples: .asciiz "A25797K" # not a full house .asciiz "7A23232" # full house, 3 twos, 2 threes .asciiz "770AJ07" # full house, 3 sevens, 2 tens .asciiz "A2227A2" # full house, 3 twos, 2 aces .asciiz "K6KQK67" # full house, 3 Kings, 2 sixes .asciiz "665663A" # not a full house .asciiz "654546Q" # not a full house We will provide a main function that will call your fullHouse function one or more times. Each time main calls fullHouse , the register $a0 will contain the address of the start of the 8- character string. The fullHouse function will print a message indicating that a full house was or was not present in the string. The fullHouse function will return in $v0 a 1 if a full house was found, and a 0 if not.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Prog4 - CSc 252 Program 4 Version 1.0 Programs 4: Full...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online