How to use C language to calculate the average? The number of input data is uncertain! I don't need to input the number

How to use C language to calculate the average? The number of input data is uncertain! I don't need to input the number

#include
int fun1(int b[])
//Calculate the number of input data
{
int i,count=0;
for(i=0;b[i]!='\0';i++)
count++;
return count;
}
double fun2(int c[],int count)
//Average and output results
{
int i;
double sum=0.0;
for(i=0;c[i]!='\0';i++)
sum+=(double)c[i];
Printf ("you have entered% d data / N, the average value is% lf", count, sum / (double) count) ";
}
main()
{
int a[SIZE],i=0,count;
do
{
scanf("%d",&a[i]);
i++;
}while(a[i-1]!='\0')
count=fun1(a);
fun2(a,count);
}