#include<stdio.h>
#include<stdlib.h>
int fun(int *a,int n)
{
if (n == 1)
return a[n - 1];
else
return fun(a+1,n-1)+a[0];
}
int main()
{
int i ,s,C;
int a[100];
printf(“please input the number of people”);
scanf("%d",&s);
printf(“Please enter the payment amount of everybody \n”);
for(i=0;i<s;i++)
{
scanf("%d",&a[i]);
}
C=fun(a,s);
printf(“The total amount of transactions is %d\n”,C);
printf(“Average input per order is %d\n”,C/s);
return 0;
}