Deal a card with a subprogram

This assignment tests your ability to create your own subprograms.

First write a subprogram called Range that generates a random integer between two limits. For example:

   Call Range (0, 3)
would generate a random integer between 0 and 3 and assign it to a global integer variable so it could be used in other parts of the program.

When your Range subprogram is working, use it in a card dealing program. When the card dealing program is working, print a screen shot of it running and the listing and turn them in.

Hint: in debugging your program, be sure to deal enough cards that the extreme values for the suit and card value occur. That will increase your confidence in your Range subprogram.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.