Need help with pseudocode assignment! about reading record and add them and print them -


Name, gender (M or F), age (in the year) and marital status (single or 1) married in a file of student record, design an algorithm for each student who will read through the file and married men, single men And count the number of married women. Print these numbers on a student summary report if they are more than 30 years of a single male age, print their names and ages on a different eligible undergraduate report.

Can anyone tell me that I am wrong in any line? Thanks! Hope you can help me! Set marriage to 0 Set from Singlemen 0 Set Married Women 0 Set Name, gender, age, status, dool (not eof), if (condition = married) from / Check / see if the situation is married, if so, then check further IF (sex = â ???? F) ???) then check if sex is F, then yes 1 married woman = married woman + 1 If ELSE (sex = â ???? Mâ € ???)) under marriage // //, then sex is M. then a married man = married husband Ale + 1 ENDIF ENDIF ENDIF if (status = single) then // Check if status, if so, the next check IF (sex = â ???? F) ??? THEN // Check if sex is F, so if singles single singles single singles = 1 female 1 ALAC if (sex = â ?? ?? ma ??? ????) then // singles, and sex is M Then print a name, age print, print an apt graduate report, if one is singles = single I + 1 (age and GT; 30) then / one single, under Sex = M and age is more than 30 "Name: One, Print the name ". Age: One, age-end age ENDIF ENDIF ENDIF Read next record ENDDO impressions "Student Summary Report"? Print- Married Men: One, Married Mass Print, Single Male: One, Single Print Print, Married Women: One, Married Women's Print ???? Single Female: A, Single Single

In the code below, I did the following:

  1. Added boolean to prevent So, it is easy to read.
  2. has changed your place due to a with a word processor. You obviously use a word processor like MS Word to write your code. Had to. (Can I suggest?)

    I have left your code mostly intact: I assume that ElseIf is not a valid keyword in your pseudo code And your professor will give you M and F .

      can give a file with gender other than 0 set set from single menu married women set set to single set from 0 set head printed header fails red name, gender, age, Status Dawl (not eof) if (condition = married) check // if the situation is married, if yes then check next (sex = 'f') // check whether sex is f, if yes then 1 Married Woman = Married Woman 1 If Elac (Sex = 'M') then Shaw If a person is married, then a married man is married = married person + 1 endiff andype EDIF if (condition = single) THEN // If the situation is single, check that if yes, then check next IF (sex = ' F ') // Check if Sex is F, so if the single single single female singles single = single female is 1 ALAC if (gender =' m ') then // singles, and sex is am then +1 Singlemen = SingleMen + 1 if (age> 30) THEN // UN DEER single, sex = M and age is greater than 30, no Print, age IF (Hap printed Header = Flays) then print 'qualified graduate report' printed header = true id if print 'name:', name print 'age:', age ENDIF ENDIF ENDIF ENDIF read next report ENDDO print 'student Summary Report 'Print' Married Men: 'Married Man Print' Single Male: ', Single Mass Print' Married Women: ', Married Women Women's Single Wives: Single Women: Single Women  / Pre>  

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -