Question: 2. Review- (loops, counters, strings, IF statements, arrays) Save As Assign12 A vote is held after 26 singers represented by the letters A-Z participated in

 2. Review- (loops, counters, strings, IF statements, arrays) Save As Assign12

2. Review- (loops, counters, strings, IF statements, arrays) Save As Assign12 A vote is held after 26 singers represented by the letters A-Z participated in round of a singing competition. Your job is to count the votes and determine the outcome. A line of input will be a sequence of characters (any amount), each of which will be A-Z representing the votes for a particular singer. Output the winner - The singer with the most votes and how many votes they had. - Tie, if there are an equal number of votes between two or more singers and the votes they had. Example run: Enter the votes: ABBABBCCZ The Winner is singer B with 4 votes Enter the votes: ABBABACCC Singer A, B, C tied with 3 votes each

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!