CISP300 HC6 Pseudocode
CISP300 HC6 Pseudocode
Module Main()
Declare String cashOut = ""
Declare Integer totalBet = 0
Declare Integer totalWon = 0
Do
Call RunSlots(totalBet, totalWon, cashOut)
Until cashOut == C or cashOut == c
Module RunSlots(Integer Ref totalBet, Integer Ref totalWon, String Ref cashOut)
Declare String wordOne = ""
Declare String wordTwo = ""
Declare String wordThree = ""
Declare Integer betAmount = 0
Declare Integer winnings = 0
Declare Integer matchCount = 0
If matchCount == 3 Then
Set multiplier = 4
Else If matchCount == 2 Then
Set multiplier = 1.5
Else if matchCount == 0 Then
Set multiplier = 0
End If
End If
End If
Set amountWon = betAmount x multiplier
Return amountWon
End Function
End