0% found this document useful (0 votes)
6 views1 page

Picking Tash Pseudocode

The document outlines a program that collects and validates weights from members, sorts them in descending order, and identifies the best and second-best performers. It also determines how many members qualify for certificates based on their weights. Finally, it outputs the names of the best performers and the total number of certificates to be printed.

Uploaded by

Huzaifa Zaheer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Picking Tash Pseudocode

The document outlines a program that collects and validates weights from members, sorts them in descending order, and identifies the best and second-best performers. It also determines how many members qualify for certificates based on their weights. Finally, it outputs the names of the best performers and the total number of certificates to be printed.

Uploaded by

Huzaifa Zaheer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//Initialization

CertificateCount= 1

FOR MemberCount 1 TO NoOfMembers

// taking input and validating weight


OUTPUT" Enter Weight Picked for:", PickerName[MemberCount]
INPUT PickedWeight[MemberCount]

WHILE PickedWeight[MemberCount] <> ROUND(PickedWeight[MemberCount],1) DO


OUTPUT"Enter your weight correct to 1dp"
INPUT PickedWeight[MemberCount]
MemberCount = MemberCount + 1
ENDWHILE
// Arranging Weight in descending order
REPEAT
Swap= False
IF PickedWeight[MemberCount] < PickedWeight[MemberCount + 1]
THEN
TEMP= PickedWeight[MemberCount]
PickedWeight[MemberCount]= PickedWeight[MemberCount + 1]
PickedWeight[MemberCount + 1]= PickedWeight[MemberCount]
Swap= TRUE
ENDIF
IF PickerName[MemberCount] < PickerName[MemberCount + 1]
THEN
TEMP= PickedName[MemberCount]
PickerName[MemberCount]= PickerName[MemberCount + 1]
PickerName[MemberCount + 1]= PickerName[MemberCount]
Swap= TRUE
ENDIF
MemberCount= MemberCount-1
UNTIL (NOT Swap) OR MemberCount=1
NEXT MemberCount

// Categorizing people as Best in Group and Second Best in Group


BestInGroup= PickerName[MemberCount]
SecondBestInGroup= PickedName[MemberCount]
// Picking Members who recieve certificate
IF PickedWeight[MemberCount] > 3.0
THEN
PickerCertificate= PickerName[MemberCount]
ENDIF
// Finding Total Number of certificates to be Printed
WHILE PickedWeight[MemberCount] > 3.0 DO
PickerCertificate[CertificateCount]= PickerName[MemberCount]
CertificateCount= CertificateCount + 1
ENDWHILE

// Displaying Results
OUTPUT "Best in Group are: ", BestInGroup
OUTPUT "Second Best In Group are: ", SecondBestInGroup
OUTPUT "Number of certificates to be Printed are: ", CertificateCount

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy