Professional Documents
Culture Documents
int sum = 0;
sum += arr[i];
return sum;
if (arr[i] == target) {
return true;
return false;
int main() {
int arr[MAX_SIZE];
int size;
std::cout << "Enter the size of the array (up to " << MAX_SIZE << "): ";
return 1;
initializeArray(arr, size);
displayArray(arr, size);
std::cout << "Average of array elements: " << average << std::endl;
int target;
std::cout << "Enter the element you want to search for: ";
if (found) {
} else {
return 0;