I typed everything in to visual studio the exact same way thatthis program is written and it doesn't work. How is theprogram supposes to move on? After i am prompt to enter incandidates and votes and i do so it doesn't go any fartherafter that. Am i doing something wrong or is this program poorlywritten? I typed everything in to visual studio the exact same way thatthis program is written and it doesn't work. How is theprogram supposes to move on? After i am prompt to enter incandidates and votes and i do so it doesn't go any fartherafter that. Am i doing something wrong or is this program poorlywritten?
Explanation / Answer
please rate - thanks this one gives the % of total votes correctly #include #include using namespace std; int sumVotes(int list[], int size); int winnerIndex(int list[], int size); int main() {string can[5]; int votes[5]={0,0,0,0,0},tot,i; for (i = 0; i < 5; i++) {cout