fork download
  1. int i=0;
  2. for(int j=0; j<voter_count; j++){
  3. for(int k=0;k<candidate_count;k++){
  4. if(preferences[j][i]==k){
  5. candidates[k].votes++;
  6. printf("votes :%i",candidates[k].votes);
  7. break;
  8. }
  9.  
  10. }
  11. }
  12. i++;
  13. return;
Success #stdin #stdout 0.03s 25832KB
stdin
Standard input is empty
stdout
int i=0;
        for(int j=0; j<voter_count; j++){
            for(int k=0;k<candidate_count;k++){
                if(preferences[j][i]==k){
                    candidates[k].votes++;
                    printf("votes :%i",candidates[k].votes);
                    break;
                }

            }
        }
        i++;
        return;