Elections are going on, and there are two candidates A and B, contesting with each other. There is a queue of voters and in this queue some of them are supporters of A and some of them are supporters of B. Many of them are neutral. The fate of the election will be decided on which side the neutral voters vote. Supporters of A and supporters of B make attempt to win the votes of neutral voters. Answer in Coding
Answers
Answered by
0
Explanation:
For c++
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
int main(){
int voteA, voteB;
/*Take input of number of votes for A and B*/
cin >> voteA >> voteB;
if(voteA > voteB){
cout << "A won the contest" << endl;
}
else if (voteA < voteB){
cout << "B won the contest" << endl;
}
else{
cout << "Draw between both candidates" << endl;
}
return 0;
}
Hope it helps!!!
If you want thus code in any other languages then ask me anytime:)
Similar questions
Hindi,
4 months ago
English,
4 months ago
Social Sciences,
4 months ago
Social Sciences,
9 months ago
English,
9 months ago
English,
1 year ago
Biology,
1 year ago