Pseudocode/Algorithm

Sigchi4life
Category:
Programming
Price: $20 USD

Question description

1) Develop an algorithm or write pseudocode to determine the winning for a constituency in the National Electrions. The algorithm must accept as input the name of four candidates and the number each candidate receives. The successful/winning candidate is the one who receives the most votes.


Print the name of the winner and the number of votes he/she received.


2) Design and execute a trace table that accepts vote data at a polling station in a constituency. Data should include special votes, general (valid) votes and spoilt votes. Votes should be cast for any one of four parties, UPM, PDR, WNA or NPP. The table should trace the increment of each vote category and determine which party secured the majority of votes. The table should have at least ten iterations and should end when a specific value is entered.

Tutor Answer

(Top Tutor) Daniel C.
(997)
School: UT Austin
PREMIUM TUTOR
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1824 tutors are online

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors