You are on page 1of 2

1. Algorithm JBT Refunds Checker.

Prepared by: Javaughn Lewis


Date Created: March 29. 2021
Purpose: This algorithm is created as I was asked to do so in an information technology sba guide. The

sba guide states that I should “Develop an algorithm to print the names of the candidates who
should receive a refund”.

2. Problem Description – This algorithm will print the names of the candidates who should receive a
refund. refund. It will show if a refund is due when the candidate’s votes
received equals or exceeds 20 per cent of the votes cast in the constituency. The

algorithm will print the name of the candidate and the words “Refund Due” or
“No Refund” and the number of candidates who received a refund.

3. Variables – Name: Thread, Candidate Name, Constitution, Polls, Numbers of Voters - Integer

4. Start
5. Write a statement to display the organization and what the algorithm does.
Print < *****************JBT Refunds Checker**************** >
6. Print
7. Thread = 0
Candidate Name = 0
Constitution = 0
Polls =0
Number of voters = 0
8. Use a For loop to set the number of records to be entered.
Syntax of the for loop – For Counter = 1 to end_value Do
For s = 1 to 15 Do
9. Start
10. Write appropriate statements to request and accept relevant data, i.e. name of candidate, the
number of votes received and the number of votes cast.
Print “Enter the candidate’s Full name.”
Input Name
Print “Enter the votes received.”
Input Votes Received
Print “Enter the votes cast.”
Input Votes Cast
11. Print
12. Use selection statement to determine if the candidate should receive a refund and count the number
of candidates who will be refunded.
Percentage: = (votes received /votes cast) *100
If percentage < 20 then
begin
Print Name, “: No Refund”
stop
If not
Print Name, “: Refund Due”
count: = count + 1
Endif
13. Print
14. Endfor (The For loop ends here)
15. Write output statements to display the number of candidates who will receive a refund.
Print “The total sum of candidates who will receive a refund is: ‘, Xcount
16. Print (this creates a clear line after the output)

3
17. Write statements thanking the user for using the algorithm and instruct him/her to press any key
to close the program.

Thank you for using The JBT Refunds Checker.


Please press any key on the keyboard to close the program.
18. Input
19. Stop.

You might also like