This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 'Club' C=8 elseif SuitB== 'Spde' C=6 else SuitB== 'Hart' C=4 end if MarkingB== 'Ten' D=10 elseif MarkingB== 'Jck' D=12 elseif MarkingB== 'Qun' D=14 elseif MarkingB== 'Kng' D=16 else MarkingB== 'Ace' D=18 end PointB=C+D; fprintf( 'Player A card is %s %s and his/her point is %d.\n' ,SuitA, MarkingA, PointA) fprintf( 'Player B card is %s %s and his/her point is %d.\n' ,SuitB, MarkingB, PointB) if PointA>=PointB; fprintf( '\nPlayer A is the winner\n' ); elseif PointB>=PointA; fprintf( '\nPlayer B is the winner\n' ); else PointA==PointB; fprintf( '\nThere is no winner\n' ); end Player A card is Club Qun and his/her point is 22. Player B card is Hart Qun and his/her point is 18. Player A is the winner Player A card is Spde Ten and his/her point is 16. Player B card is Spde Qun and his/her point is 20. Player B is the winner...
View Full Document
This note was uploaded on 11/10/2010 for the course PGE 323K taught by Professor Lake during the Spring '08 term at University of Texas.
- Spring '08