Q:

count the person that have number lower than 60

count how many person that have grade lower than 60 and then print the result.
the code : 
struct student{
  char id[10];
  char fname[25];
  char lname[25];
  char letter[10];
  int quiz[4];
  int assignment[4];
  int project,MID,Final,grade,percentage,average,sum,fail;
};

int main(int argc, char const *argv[]) {
  struct student person[10];
  int input,choose,temp;

  printf("Input Student : ");
  scanf("%d",&input );
  printf("\n");

  int i,j,k,h,l;
  for ( i = 0; i < input; i++) {
    int count=0,count2=0;
    fail=0;
    printf("Input Id : ");
    scanf("%s",person[i].id);
    printf("Input Name : ");
    scanf("%s",person[i].fname);
    scanf("%s",person[i].lname);
    printf("\n");

    //input assignment
    for ( j = 0; j < 3; j++) {
      printf("Input Assignment%d : ",j );
      scanf("%d",&person[j].assignment[i] );
      count+=person[j].assignment[i];
      person[i].average = count/3;
    }
    person[i].percentage = person[i].average*0.20;

    printf("\n");
    //input quiz
    for ( k = 0; k < 4; k++) {
      printf("Input Quiz%d : ",k );
      scanf("%d",&person[k].quiz[i] );
      count2+=person[k].quiz[i];
      person[i].average = count2/4;
    }
    person[i].sum = person[i].average*0.10;
    printf("\n");

    //input Project
    printf("Input Project Value%d : ",i );
    scanf("%d",&person[i].project );
    person[i].project= person[i].project * 0.15;
    printf("\n");

    //input MID
    printf("Input Project Value%d : ",i );
    scanf("%d",&person[i].MID );
    fflush(stdin);
    person[i].MID= person[i].MID * 0.25;
    printf("\n");

    //input Final
    printf("Input Project Value%d : ",i );
    scanf("%d",&person[i].Final );
    fflush(stdin);
    person[i].Final= person[i].Final * 0.25;

    //count Grade
    person[i].grade = person[i].percentage + person[i].sum + person[i].project + person[i].MID + person[i].Final;

    printf("\n");

    person[i].fail = person[0].grade;
    for ( l = 0; l < input; l++) {
      if (person[l].grade < 60) {
        person[i].fail++;
      }
    }
  }

i'd expected the output is like this.

if more than three person have grade <60, it will print "3 people have lower grade" or "not pass". 
and if three person have >60 "3 people pass".

here's the complete source code : 
https://github.com/PrinceSP/compro-1/blob/master/compro2/Structure/Exercise2.c

A:

in this code , main does never end so it cant be compiled , please check that and then give us more information about your problem

