#include #include using namespace std; int main() { const int SIZE {10}; int numbers[SIZE] {0}; // Zero-initialize the array int max {0}; // Zero-initialize max // Seed the random number generator srand(time(0)); // Fill the array with random numbers between 1 and 100 cout << "Array elements:\n"; for (int i = 0; i < SIZE; ++i) { numbers[i] = rand() % 100 + 1; cout << numbers[i] << " "; } cout << endl; // Set initial max to the first element in the array max = numbers[0]; // Find the maximum number in the array for (int i = 1; i < SIZE; ++i) { if (numbers[i] > max) { max = numbers[i]; } } cout << "Maximum value in the array: " << max << "\n"; return EXIT_SUCCESS; }