Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please give me the Pseudocode in language C for the 4 Problems. Sample Exercises

ID: 664847 • Letter: P

Question

Please give me the Pseudocode in language C for the 4 Problems.

Sample Exercises Sequence, loops and decision structures will have to be used in different combinations for each problem: Exercise 1: To print the smallest number in a large set of numbers. Exercise 2: To print the average of a large set of numbers. Exercise 3: To check a list of job applicants and reject all those who either smoke or drink. Exercise 4: To ask for a number, less than 50, and then keep adding 1 to it until 50 is reached. Report the sum result

Explanation / Answer

Exercise 1:

greatest=0

WHILE more numbers to check

Read number

IF number is greater than greatest

THEN greatest=num

END WHILE

Print greatest

Exercise 2:

Set average to zero

Set total to zero

Set num_values to zero

While more numbers to calculate

Read number

Add 1 to num_values

Add number to total

End While

Set average=total/num_values

Print average

Exercise 3:

Set selected to true

While more applicants in list

Read does_smoke

Read does_drink

If does_smoke is true or does_drink is true

Set selected to false

End While