#include <iostream>
using namespace std;
int main() {
    int A[7] = {4,3,21,1,25,4,10};
    int mayor = -999999;
    for (int i = 1; i < 7; i++){
        if(A[i] > mayor) {
            mayor = A[i];
        }
    }
    cout <<"El elemento mayor del arreglo A es: "<<mayor;
    return 0;
}
    //Notese que en este caso, el "[]" se utiliza para delimitar la cantidad de valores dentro de la variable [A],
    //Y con "= {" se determina que valores se van a utilizar.
    

Embed on website

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