小孩跳绳能长高吗:哪位大哥或大姐帮我翻译一下这道题目啊,这是一道编程题.非常感谢了~!

来源:百度文库 编辑:神马品牌网 时间:2024/05/09 11:59:15
Contents: This assignment gives students the opportunity to work with arrays and sorting.Programs that simulate card games usually have to simulate the operation of shuffling the deck. Like sorting, shuffling is a process that involves rearranging the elements of an array. Algorithmically, the only difference between sorting and shuffling is how you select elements. When you sort an array using selection sort, you choose the smallest element in the rest of the array on each cycle of the loop. When you shuffle an array, you choose a random element. At last, you should sort the 13 cards in descending order by suit.
Steps: Write a function Shuffle that shuffles an array of strings. To test the Shuffle function, write a program that.
1. Declares an array with 52 elements, each of which are strings.
2. Fills the elements of that array with strings representing standard playing cards. Each card is represented by a string consisting of a rank (A, K, Q, J, 10, 9, 8, 7, 6, 5, 4, 3, 2) concatenated with a single letter representing a suit (C, D, H, S). Thus, the queen of spades is represented by the string "QS". The function IntegerToString described in Chapter 9 (page 302) will probably come in handy here.
3. Shuffles the array using the Shuffle function.
4. Deals a bridge hand by copying the first 13 cards from the deck to a separate array.
谢谢你的回答.谢谢~~!

Contents:洗牌和排牌的区别
Steps:设计的步骤
1。声明一对列的元素 每个都必须是字符串类型
2。给这些元素标准扑克牌的描述性字符。 每张牌有一个描述性的等级(A K Q J 10 9 .... 2) 然后加上一个单个字母表示花色(C-梅花 D-方片 H-红桃 S-黑桃)。因此黑桃Q可以用字符串“QS”表示。字符数据转换函数在第九章(302页)在这可能能用到
3。用洗牌函数洗这个队列。
4。通过从一副牌里复制前13张牌到一个单独的数列来"deal a bridge hand" -(I don't know what exactly it means).
So are you clear now?
你明白了吗?