Question: Could you do this with C++ and only using iostream and using namespace std; In this assignment we have used : if else , while,
Could you do this with C++ and only using iostream and using namespace std; Homework #5 Due Thursday, October 19 Write a program that inputs three integers in the range [1..13] that represent a hand of three cards. Your program should output an English evaluation of the hand. In the output, 2-10 are called by the words for their numeric values: two, three, etc. 1 is called an ace, 11 is called a jack, 12 is called a queen, and 13 is called a king. . . The evaluation of a hand is based on the first of the following cases that matches the cards: All three cards are equal. Sample output for 4 4 4: You have three fours The three cards form a straight (three successive values) Sample output for 8 6 7: You have a straight ending with an eight Two cards are equal. Sample output for 6 6 3: You have a pair of sixes. Whatever is the highest card. Sample output for 11 1 8: You have a jack I recommend sorting the values before trying to evaluate the hand - that makes it much easier Also, work on one thing at a time: what kind of hand (3 of kind, 2 of kind, straight,..) first and then what is the "significant" card for that hand. Check for equal cards, not 3 aces, then 3 2's then 3 3's, etc. If you check each value, your program will be hundreds of lines long! The program GoldOS.exe demonstrates what your program should do. Note that Ace is 1 and is not also 14 (greater than king). Also note appropriate use of a/an (before a card) and sles (after a card). Also note use of the new input template that includes a loop. You should turn in (in a pocket folder): this assignment/grading sheet (write your name in space below), your statement of completeness, a structure chart corresponding to comments in your code, and a full printout of your program. All documents should be appropriately labeled. You should also place a folder named "Homework 05" containing your Main.cpp file into the private folder of your FTP site outline Grading Sheet, Homework #5 Name: Possible Achieved Criteria Statement of Completeness Structure Chart Clear Indentation and Spacing Internal Code Comments Appropriate Use of Variables Appropriate Use of Statements &Expressions5 Complete/No Errors Output Format and Correctness Presentation 43 Notes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
