Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

help to finish this program: Given an array and the size of the array, find and

ID: 3617988 • Letter: H

Question

help to finish this program: Given an array and the size of the array, find and return thesmallest value in the array.
 For example, if the array contains  4, 1, 6, 3, 7, 9, 4, 5, 2, 6, 10, 8,
 then it should return 1.
varibles should be used are
 anArray, size,   anArray[0], anArray[index], index, smallest
 #include <iostream>#include <fstream>#include <string>using namespace std;


help to finish this program: Given an array and the size of the array, find and return thesmallest value in the array.
 For example, if the array contains  4, 1, 6, 3, 7, 9, 4, 5, 2, 6, 10, 8,
 then it should return 1.
varibles should be used are
 anArray, size,   anArray[0], anArray[index], index, smallest
 #include <iostream>#include <fstream>#include <string>using namespace std;


Explanation / Answer

#include #include #include using namespace std; int returnSmallestIndex(int anArray[], intsize); int main(){ int index = 0; int arr[] = {4, 1, 6, 3, 7, 9, 4, 5, 2, 6, 10, 8}; cout