November 26, 2018
Write a program that
myArray
of int
of size 10,myArray
with ten values of your choice (one of them should be 5),myArray
,myArray
,myArray
,myArray
,true
if the number 5 occurs in myArray
, false otherwise,myArray
, − 1 otherwise,true
if every number in myArray
occurs exactly once.An example of execution could be:
The content of the array is: 0 3 5 -3 10 5 7 8 9 123
The greatest value in the array is: 123
The lowest value in the array is: -3
The average of the values in the array is: 16.7
The number 5 occurs in the array: true
The smallest index where the number 5 occurs is: 2
Every number occurs exactly once in the array: false
Once this works, change the values in the array and make sure your program has the right output.
Continue working on your program, and add portion of code that
myArray
occurs,myArray
occurs,int
, and fills it with values,true
if the second array is of the same size as myArray
,true
if the second array has at least one value in common with myArray
.