Continually store least 10 sensor values for calculation

I have connect MPU6050 with my Arduino. I want get least 10 values from MPU and store it continually. That's mean sensor will give 11th value to Arduino it automatically delete 1st value foe maintain 10 values. How can I make that. Guys, need help me to fix this. Give an example if possible that's I really appreciate.

https://en.wikipedia.org/wiki/Circular_buffer

You don’t “delete” the first sample, simply overwrite it
An array is a useful construct.

How can I make that. Guys,

An array with 10 levels used as a circular buffer

An example

byte anArray[5];

void setup()
{
  Serial.begin(115200);
  while (!Serial);
}

void loop()
{
  static byte index = 0;
  anArray[index++] = random(256);
  if (index == 5)
  {
    index = 0;
  }
  printArray(index);
  delay(2000);  //simulate waiting for another reading
}

void printArray(byte printIndex)
{
  byte count = 0;
  while (count < 5)
  {
    Serial.println(anArray[printIndex++]);
    if (printIndex == 5)
    {
      printIndex = 0;
    }
    count++;
  }
  Serial.println();
}

This example puts random values in an array with 5 elements and keeps track of where the next entry should be stored using the index variable. Once index reaches the last level it wraps round to the start again.

Instead of printing the values you could average them but run it as it is to see the circular buffer in action

I always prefer a low-pass filter. Only need to remember 1 number.

The electrical noise in a sensor’s output is the primary factor limiting its smallest possible measurement. All electronic components produce small random changes in voltage potentials that combine throughout the circuitry and appear as a band of noise when viewed with an oscilloscope myprepaidcenter