#include<stdio.h>

main()

{

 float weight[10],sum=0,ave;

 int i,n;

 

 do{

    printf("Enter number n (1<=n<=10): ");

    scanf("%d",&n);

   }while(n<1||n>10);

 

 for(i=0;i<n;++i)

    {

     printf("No.%2d: Weight(kg)= ",i+1);

     scanf("%f",&weight[i]);

    }

 

 for(i=0;i<n;++i)

    sum+=weight[i];

 

 ave=sum/(float)n;

 printf("Average= %.2f(kg)\n",ave);

}