CSCI 261 - Programming Concepts (C++)

Spring 2017 - Lab 07A

Quick Links: Blackboard | Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |
This lab is due by Tuesday, March 14, 2017 11:59pm.


Instructions



For this lab, write a function called myRand that accepts one integer parameter called maxValue and returns an integer. The parameter should be used to return a random number between 0 and maxValue-1. Once you have your function written, ask the user to enter the maximum random value and then using a for loop, call your functions 10 times. An example is below:

What is the max random number you would like?  15
Random Value #1: 5
Random Value #2: 11
Random Value #3: 2
Random Value #4: 14
Random Value #5: 2
Random Value #6: 0
Random Value #7: 6
Random Value #8: 7
Random Value #9: 2
Random Value #10: 1


Lab Submission



You will submit your solution to this lab with the rest of Week07. Detailed instructions for doing this are posted in Assignment 07.


This lab is due by Tuesday, March 14, 2017 11:59pm.
Last Updated: 01/01/70 00:00


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0