/in/foo.c:8:1: error: unknown type name 'ZX'
ZX wang(float a[],int n)
^~
/in/foo.c:8:1: note: use 'struct' keyword to refer to the type
/in/foo.c: In function 'wang':
/in/foo.c:10:2: error: unknown type name 'ZX'
ZX zx;
^~
/in/foo.c:10:2: note: use 'struct' keyword to refer to the type
/in/foo.c:11:4: error: request for member 'max' in something not a structure or union
zx.max=a[0];
^
/in/foo.c:12:4: error: request for member 'min' in something not a structure or union
zx.min=a[0];
^
/in/foo.c:13:4: error: request for member 'ag' in something not a structure or union
zx.ag=0;
^
/in/foo.c:16:8: error: request for member 'max' in something not a structure or union
if(zx.max<a[i])
^
/in/foo.c:18:6: error: request for member 'max' in something not a structure or union
zx.max=a[i];
^
/in/foo.c:20:8: error: request for member 'min' in something not a structure or union
if(zx.min>a[i])
^
/in/foo.c:22:6: error: request for member 'min' in something not a structure or union
zx.min=a[i];
^
/in/foo.c:24:5: error: request for member 'ag' in something not a structure or union
zx.ag+=a[i];
^
/in/foo.c:25:5: error: request for member 'ag' in something not a structure or union
zx.ag/=n;
^
/in/foo.c: In function 'main':
/in/foo.c:33:15: error: 'a' undeclared (first use in this function)
scanf("%f",&a[i]);
^
/in/foo.c:33:15: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:34:2: error: unknown type name 'ZX'
ZX zx=wang(a,10);
^~
/in/foo.c:34:2: note: use 'struct' keyword to refer to the type
/in/foo.c:35:28: error: request for member 'max' in something not a structure or union
printf("%.2f %.2f,%.2f",zx.max,zx.min,zx.ag);
^
/in/foo.c:35:35: error: request for member 'min' in something not a structure or union
printf("%.2f %.2f,%.2f",zx.max,zx.min,zx.ag);
^
/in/foo.c:35:42: error: request for member 'ag' in something not a structure or union
printf("%.2f %.2f,%.2f",zx.max,zx.min,zx.ag);
^
/in/foo.c:34:5: warning: variable 'zx' set but not used [-Wunused-but-set-variable]
ZX zx=wang(a,10);
^~