Our Project/corewarV3/corewarV3.cpp
// Count how many have processes still running
Count how many have processes still running
Count how many have processes still running
int survivor_count(int n_proc[MAX_PROCESSES]){
  int count = 0;
  for(int i = 0; i < MAX_PROCESSES; i++){
    if(n_proc[i] > 0){
      count++;
    }
  }
  return count;
}
int survivor_count ( int n_proc [ MAX_PROCESSES ] ) { int count = 0 ; for ( int i = 0 ; i < MAX_PROCESSES ; i ++ ) { if ( n_proc [ i ] > 0 ) { count ++ ; } } return count ; }
Count how many have processes still running
Count how many have processes still running