[Solved] CMPSC 101 – LAB 14

30 $

File Name: CMPSC_101_–_LAB_14.zip
File Size: 188.4 KB

SKU: [Solved] CMPSC 101 – LAB 14 Category: Tag:

Or Upload Your Assignment Here:


Write a program to ask the user to enter 6 numbers and store them into an integer array. Then examine the array, if the numbers in the array are all unique, display message “All unique!”, otherwise display the message “Not all unique!”.Sample run 1:enter a number: 1enter a number: 87enter a number: 3enter a number: 19enter a number: 56enter a number: 777All unique!Sample run 2:enter a number: 8enter a number: 9enter a number: 10enter a number: 8enter a number: 10enter a number: 788Not all unique!Directions: Use the following program structure for your main.You may create more functions if you wish, but it is not required.int main() {int myArray[6];// code to fill in the array from the user// code to determine if all of the values are uniquereturn 0;}NOTE: DO NOT USE GLOBAL VARIABLES!!!!!A global variable is a variable that is defined outside of any function(including main). We don’t cover them in this course because they are generallya very bad idea. So, don’t do this in your projects!ALSO: DO NOT USE ANY ASPECT OF C++ WHICH IS NOT COVERED IN THIS COURSE. This includes libraries, etc.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CMPSC 101 – LAB 14
30 $