國立屏東商業技術學院 資訊工程系 物件導向程式設計
練習loops與array。
Please input numbers: #1: 2 #2: 4 #3: -3 #3: -7 #3: 8 #4: 6 #5: 0 MAX=8 MIN=2 AVG=5.0
Please input 10 numbers: #1: 5 #2: -1 #2: -3 #2: 8 #3: 9 #4: 3 #5: 7 #6: 10 #7: 1 #8: 0 #9: -3 #9: 15 #10: 5 Sorting results: 0 <= 1 <= 3 <= 5 <= 5 <= 7 <= 8 <= 9 <= 10 <=15
♣8 ♥A ♠9 ♥Q ♥K ♦9 ♣5 ♦7 ♠3 ♥9 ♠T ♥3 ♥J ♦4 ♠8 ♥8 ♦3 ♥5 ♠4 ♦2 ♠6 ♥6 ♦K ♠A ♥T ♥2 ♦5 ♠2 ♣Q ♣6 ♣K ♣J ♣2 ♦T ♠5 ♦J ♦Q ♥4 ♠7 ♣4 ♦A ♣T ♠J ♣3 ♠K ♦6 ♣7 ♥7 ♣A ♦8 ♠Q ♣9
♣8 ♥A more card (y/n)? y ♣8 ♥A ♠9 more card (y/n)? n You have 18 points.
♥Q ♥K more card (y/n)? n You have 20 points.
♦9 ♣5 more card (y/n)? y ♦9 ♣5 ♦4 more card (y/n)? y ♦9 ♣5 ♦4 ♠2 more card (y/n)? y ♦9 ♣5 ♦4 ♠2 ♠3 You have 23 points.
♥J ♠A more card (y/n)? n You have 21 points.