nonipal

Untitled

Jul 14th, 2021
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. void tabulate(void)
  2. {
  3.     // TODO
  4.  
  5.     for (int i = 0; i < voter_count; i++)
  6.     {
  7.         for (int j = 0; j < candidate_count; j++)    
  8.         {
  9.             if (!candidates[preferences[i][j]].eliminated)  
  10.             {
  11.                 candidates[preferences[i][j]].votes++;
  12.                
  13.                 break;
  14.             }
  15.         }  
  16.     }
  17.     return;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment