forked from CSUF-s18-121-05-15/Lab5
-
Notifications
You must be signed in to change notification settings - Fork 0
tanis62599/Lab5
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
CPSC 121
Lab 5
Spring 2018
Eric May
Using Arrays
Create a program that:
1. Prompts the user to input values for an array of five integers
2. Displays a menu, where the user may choose
a) Sum - Calculates and displays the sum of numbers in the array
b) Mean - Calculates and displays the average of numbers in the array. Should not round.
Should not be an integer!
c) Display - Displays the current values held in the array
d) Sequencing - Displays the difference between each adjacent set of values
Ie if we had 3 5 2 9 0, we would get the output
2 -3 7 -9
This just needs to be printed, not saved
e) Search - Indicate whether the user’s chosen value is contained in the array, or not (boolean result should be returned, ie function).
f) Edit - The user is re-prompted for input into the array (all elements)
g) Exit - terminate the program
3. Loop back to step 2
There should be at least 4 functions used in this program. The argument should be the array itself in most of these functions.
You should probably use a global const int for array size. Do not use global variables unless they’re constants!
Points:
1 - Documentation, readability, format
2 - Proper use of functions
3 - Proper program flow (conditionals, loops, etc)
2 - Filename and Header
2 - Output testing
Header
//Author: Eric May (your name)
//CPSC 121 Lab 5
//<MM/DD/YY> (Current Date)
Filename
<Last Name><First Initial>lab5.cpp
For example, my assignment would be named MayElab5.cpp
Name your repository after your filename. Create your submission from the following link: https://classroom.github.com/g/1KAvw0Ag
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published