Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
391 B
1
Indexable
Never
//23.11.2023
#include <iostream>
using namespace std;
int main()
{
    int n;
    cin >> n;
    double a;
    double max = 0;
    int i = 0;
    int num_max = 0;
    while (n > 0)
    {
        n--;
        i++;
        cin >> a;
        if (max < a)
        {
            max = a;
            num_max = i;
        }
    }
    cout << "\n" << num_max;
    return 0;
}
Leave a Comment