CSCI 261 - Programming Concepts (C++)Spring 2018 - Lab 5BQuick Links: Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks |
|
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |
This lab is due by Thursday, March 15, 2018 11:59 PM . Instructions
This lab will make Lab4C more flexible.
Instead of requiring the user to enter 15 numbers every time, we will
allow the user to enter as many numbers as they wish (assume they will
enter at least 1 number). The user will enter non-negative numbers
(greater than or equal to zero) one at a time. When the user wishes to
no longer enter numbers, the user should enter -1 to signal they are
done.
When the user is done entering numbers, print in order:
Hey! Witness my first vector mojo!
Enter as many non-negative numbers as you'd like and I will tell you what they are. When you wish to be done, enter -1 to stop entering numbers. Your Number Is: 8 Your Number Is: 6 Your Number Is: 7 Your Number Is: 9 Your Number Is: 3 Your Number Is: 2 Your Number Is: 4 Your Number Is: -1 So awesome! You entered 7 numbers. The numbers are: 8 6 7 9 3 2 4 Have a nice day! The smallest number is: 2 The largest number is: 9 The first number is: 8 The last number is: 4 Gaze at my awesome.
A second interaction may look like:
Hey! Witness my first vector mojo!
Enter as many non-negative numbers as you'd like and I will tell you what they are. When you wish to be done, enter -1 to stop entering numbers. Your Number Is: 8 Your Number Is: 6 Your Number Is: 7 Your Number Is: 9 Your Number Is: -1 So awesome! You entered 4 numbers. The numbers are: 8 6 7 9 Have a nice day! The smallest number is: 6 The largest number is: 9 The first number is: 8 The last number is: 9 Gaze at my awesome. Functional Requirements
This lab is due by Thursday, March 15, 2018 11:59 PM . | |
Last Updated: 02/15/18 13:11
|