Computer Science, asked by abidabbaskhan028, 9 months ago

program to print candidate with maximum numbers of Votes. if they have equal number of votes, print"coalition goverenment".

Answers

Answered by BLANKBABA
0

Explanation:

#include<stdio.h>

int main(){

int candidate_1,candidate_2;

printf("Enter votes of 1st Candidate");

scanf("%d",&candidate_1);

printf("Enter votes of 2nd Candidate");

scanf("%d",&candidate_2);

if(candidate_1==candidate 2){

printf("Coalition government");

}

else if(candidate_1>candidate2){

printf("Candidate 1 wins");

}

else{

printf("Candidate 2 wins");

}

return 0;

}

Similar questions