Write a whole program for presidential Elections, the user will enter his votes based on the code for each candidate. The Program will add the total votes for each candidate and proclaim the winner whoever got the most number of votes. The user will stop in accepting votes if the used entered Letter ‘Q’ to quit. Type ‘V’ to vote and ‘R’ to view the result.
1
Expert's answer
2013-01-28T09:28:35-0500
#include <iostream>
using namespace std;
int main() { int voutes[10];
cout<<"how many candidates? please enter number"<<endl; int n; cin>>n; int summ; int sum[n]; int max=0; for(int i=1;i<=n;i++) { cout << "please enter votes of candidate" <<i<<endl;
Comments
Leave a comment