declare an array of known size to hold the names of the items:
char item[10]30];

declare an array of same size as first array to hold the price of the item
double price[10];

calculate average price or get it ffrom some other source


for each item in the array calculate the difference between the items price and the average price and store it in the average price price array.
double difference[10];

use a loop to display results:

for(i = 0; i < 10i++)
{
cout << item[i] << " has a price of " << price[i] << " which is " <<
difference[i] << " from the average price." << endl;