Skip to content

Instantly share code, notes, and snippets.

@ayy99
ayy99 / gist:932bf9f35a211b70f0e8858576de3f91
Created August 4, 2021 18:50
what is wrong with my code ,it does execute till (rank 1:)then whatever i type in there its invalid vote
#include <cs50.h>
#include <stdio.h>
#include<string.h>
// Max voters and candidates
#define MAX_VOTERS 100
#define MAX_CANDIDATES 9
// preferences[i][j] is jth preference for voter i
int preferences[MAX_VOTERS][MAX_CANDIDATES];