Home > Back-end >  [C] card programming, urgently, online etc
[C] card programming, urgently, online etc

Time:06-08

1, write a function newcard, function generated by random number 5 CARDS (not including any king and small
The king), must meet specifications and points in a deck of CARDS, that is design and color is only: "red
Heart, black spade, club, party diamond "four points to: 1 ~ 13; Need to design
Global data structure to store the five CARDS, requirements as far as possible concise,
2, write a function analyze, this paper analyzes five CARDS, including seven kinds of situations: flush flush (five
Continuous points, design and color is the same brand), shunza straight (five consecutive points, design and color is different
Card), four Fried four (there are four points are the same, different brand of design and color), three dragged two full_house (5
Card has three points in the same pair and 1), three Fried three (three points, the same design and color is different
CARDS), two pairs of two_paires pair (2), a pair of pair pair (one); Analysis of the
The string stored in English to character pointer returned,
3, write the main function, first call newcard licensing, again calling analyze analysis, then output analysis
As a result, design a simple interaction, can make the program run time according to the input end run or run many times,

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html