Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

// Author: Kenrick Norman, Sonika Dacres, Peter-John Kennedy

// Date created: February 6th , 2024

Pseudocode: WinningCandidate(Input, Output)

// This program will accept the name, party and votes of a total of four candidates in a constituency that
he/she represents.

// The program will then determine the winning candidate by the total votes received, and display
the //information about that winning candidate, regarding the Name of the candidate that won, the
party //and votes received by the candidate.

Variables:

- Winning_Candidate, Winner_Party : string


- Winner_Votes, Candidate_Votes, NumberOfCandidate: integer

START

Winning_Candidate USERINPUT
c
Winner_Party USERINPUT

Winner_Votes USERINPUT

FOR NumberOfCandidate = 0 to 2

Candidate_Votes USERINPUT

IF Candidate_Votes > WinnerVotes THEN

Winner_Candidate USERINPUT

Winner_Party USERINPUT

Winner_Votes Candi_Votes

ENDIF

ENDFOR

OUTPUT Winner_Name, Winner_Party, Winner_VotesReceived

STOP

You might also like