#include <iostream>
using namespace std;

int main() {
    int num[10]={5,7,10,2,8,15,3,9,4,1};
    int maxVal = num[10];

    for (int i = 1; i < 10; i++) {
        if (num[i] > maxVal) {
            maxVal = num[i];
        };
    }

    cout << maxVal <<endl;
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: