Pseudocode: Start sumfemaleswithcerificate = 0 sumfemales = 0 totaloneyear = 0 t
ID: 3829813 • Letter: P
Question
Pseudocode: Start sumfemaleswithcerificate = 0 sumfemales = 0 totaloneyear = 0 totaltwowears = 0 totalcertificate = 0 totalage = 0 Read age, gender, collegeyears, certificate DOWHILE certificate is not equal to "0" rightarrow IF gender = 1' THEN rightarrow rightarrow sumfemales sumfemales + 1 rightarrow rightarrow totalage = totalage age rightarrow ELSE rightarrow ENDIF rightarrow IF college years, = 1 THEN rightarrow rightarrow totaloneyear = totaloneyear + 1 rightarrow ELSE rightarrow rightarrow IF college years = 2 THEN rightarrow rightarrow rightarrow rightarrow ENDIF rightarrow ENDIF rightarrow IF certificate = '2' THEN rightarrow rightarrow = totalcertificate +1 rightarrow ELSE rightarrow rightarrow totalcertificate = totalcertificate + 1 rightarrow ENDIF rightarrow Read age, gender collegeyears, certificate ENDDO avgage females = sumfemales totalage totalcertificate Writer a females, totaloneyear, sumfemal Stop rightarrowExplanation / Answer
assuming female is 1 and male 0 (if reverse change gender = '1' to gender = '0')
Change do while line to
DOWHILE end of input
ENDIF
change certificate ='2' line to
if Certificate = '1' then
totalCertificate = totalCertificate + 1
endif
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.