Program is supposed to put out messages saying this number is x lower than the average. This number is x larger than the average.

Instead it puts out

The value 1.00000 is 44.000000 smaller than the average (should be 4.50000000. Even for the larger numbers for eg value 8 it puts out that it is 36.000000 smaller despite the fact it is 4.5 bigger. What have I done wrong?

Code:

#include <stdio.h>
void main()
{
float list[10];
int count = 0;
float difference = 0.0;
float average;
float value = 0;
list[0]=1.0; list[1]=2.0; list[2]=3.0; list[3]=4.0; list[4]=5.0;
list[5]=6.0; list[6]=7.0; list[7]=8.0; list[8]=9.0; list[9]=0.0;
while (count < 10)
{
value = value + list[count];
count++;
}
average = value/10;
printf("The average value in the array is %f.\n", average);
count=0;
while (count < 10)
{
difference = value-list[count];
if(value > list[count])
printf("The value %f is %f smaller than the average %f.\n", list[count], difference, average);
else
printf("The value %f is %f greater than the average %f.\n", list[count], difference, average);
count++;
}
return;
}