This is the program that I need to solve:

> 
> Write a program that asks the user to enter the number of pancakes eaten for breakfast by 10 different people (`Person 1, Person 2, ..., Person 10`).  
> 
>  Once the data has been entered the program must analyze the data and output which person ate the most pancakes for breakfast.
> 
> 
> 

Could anybody write the code for returning the index of biggest value (I have labeled it as "h")

```
#include "iostream"

using namespace std;

int main()
{

    int x[11];
    int y;
    int h;
    for (int i = 1; i <= 10; i++)
    {
        cin >> i[x];
        cout << "Person: " << i << " has eaten " << i[x] << " pancakes" << endl
        y = x[0];
        h = x[0];

        for (int j = 1; j <= 10; j++)
        {
            if (x[j] > y)
            {
                y = x[j];
            }
        }
    }
    cout << "The most pancakes are eaten by Person " << h << " with " << y << endl;
    system("pause");
    return 0;
}

```