Programming Examples
Write a program to count number of votes secured by A and B
Write a program to count number of votes secured by ‘A’ & ‘B’. Assume three voters are voting them. Also count the invalid votes
Solution
Output
OUTPUT:
Press A or B
Voter no. 1 Enter Vote :A
Voter no. 2 Enter Vote :A
Voter no. 3 Enter Vote :A
Status of vote(s)
A secures 3 vote(s).
B secures 0 vote(s).
Invalid votes 0.