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

Pseudocode

Program Name: GR_ITSBA_2020


{This program will be used to determine the candidates who will receive a full refund of
their Nomination Fee}
Declaration:
Can_Nm, Party_ID are of type String
Can_Rating, Votes_Cast, x, z, n, Sum are of type Integer
Votes_Received, Avg_VR are of type REAL
Begin
Sum = 0
x=0
z=1

For z := z to n, Do

Input Can_NM, Can_Rating, Party_ID, Votes_Cast, n.


Rating_PCT = (Can_Rating / 100)
Can_VR = (Rating_PCT * Votes_Cast)

If Can_Rating >= 20

Then
x=x+1
Output Can_Nm, Party_ID, Can_Rating, Can_VR, ‘Fee Refundable’
Sum = (Sum + Can_VR)

Else
Output Can_Nm, Party_ID, Can_Rating, Can_VR, ‘Fee Not Refundable’

Avg_VR = (Sum / x)
Output Avg_VR, x
End.

You might also like