CSCI 261 - Programming Concepts (C++)Fall 2016 - Lab 08AQuick Links: Blackboard | EECS | Mines | Piazza | zyBooks |
|
| Home | Contact | Syllabus | Assignments | Schedule | Resources | | |
This lab is due by November 02, 2016 08:00am.
Instructions
This lab will make Lab07B 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 how many numbers the user entered. Then print out the numbers the user entered. After printing out the values the user entered, modify your function to accept a vector. Name this new function FindLargestVectorValue and then call your function and print the resulting largest value. An example interaction follows:
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 largest number is: 9 Gaze at my awesome. Functional Requirements
Lab Submission
You will submit your solution to this lab with the rest of Week09. Detailed instructions for doing this are posted in Assignment 09.
This lab is due by November 02, 2016 08:00am.
| |
Last Updated: 01/01/70 00:00
|