COMP 248 Midterm: COMP 248 Midterm 2011 Fall B

119 views5 pages
31 Jan 2019

Document Summary

Only encs-approved calculators (with the encs sticker) are allowed. No other electronic devices (including cell phones) are allowed. No books, papers or extra notes are allowed. Question (100pts) write a complete program to evaluate a hand of 3 cards. Your program should: ask the user for 3 integers and 3 strings. The integers will represent the values of the cards, and the strings will represent their suits: you must check that the integers entered by the user are valid. If they are not between 1 and 13 (1=ace, 2=2, , 11=jack, 12=queen, 13=king), you must display an error message and quit the program: you can assume that the strings will be valid. You are guaranteed that the user will enter the strings "hearts" ( ), "spades" ( ), "diamonds" ( ) or "clubs" ( ): use a switch statement. , to display on the screen the first card only in plain english.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents