Nine coins are placed in a 3x3 matrix with some face up and some face down. You can represent the state of the coins using a 3x3 matrix withvalues 0 (heads) and 1 (tails). Here are some examples:0 0 0 1 0 1 1 1 00 1 0 0 0 1 1 0 00 0 0 1 0 0 0 0 1Each state can also be represented using a binary number. For example, the preceding matrices correspond to the numbers:000010000 101001100 110100001There are a total of 512 possibilities, so you can use decimal numbers 0, 1, 2, 3,...,511 to represent all the states of the matrix. Write a program that prompts the user to enter a number between 0 and 511 and displays the corresponding matrix with the characters H and T.
Type your question here (or upload an image)
Brown University1271 Tutors
California Institute of Technology2131 Tutors
Carnegie Mellon University982 Tutors
Columbia University1256 Tutors
Dartmouth University2113 Tutors
Emory University2279 Tutors
Harvard University599 Tutors
Massachusetts Institute of Technology2319 Tutors
New York University1645 Tutors
Notre Dam University1911 Tutors
Oklahoma University2122 Tutors
Pennsylvania State University932 Tutors
Princeton University1211 Tutors
Stanford University983 Tutors
University of California1282 Tutors
Oxford University123 Tutors
Yale University2325 Tutors
Enter the email address associated with your account, and we will email you a link to reset your password.
Forgot your password?
Business & Finance
How it Works
Become a Tutor
Media & Press
Studypool inc. © 2015
Studypool is a marketplace that helps students get efficient academic help.