#include 

struct results {
  int bunho;
  char *pname;
  int jum[3];
  double ave;
  char grade;
};

double getave(struct results s);      /prototype

void main()
{
  struct results student={1001,"han junghwa", 98, 85, 70, 0.0, ' '}; 
  
   student.ave=getave(student);


}
double getave(struct results s) {
     int i;
    for (i=0; i<3; ++i)
       
         s.ave= s.ave + s.jum[i];
     s.ave=s.ave/3.0;
return {s.ave);
}

    Source: geocities.com/emailhjh