{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Simple Array Process

# Simple Array Process - Declare X[100 Set Sum = 0 Set Count1...

This preview shows pages 1–2. Sign up to view the full content.

Open “SALARIES” For Output as New File Write “Enter the employee’s name and salary.” Write “Enter 0 for both when done.” Input Employee, Salary While Employee <> “0” Write New File, Employee, Salary Write “Enter the employee’s name and salary.” Write “Enter 0 for both when done.” Input Employee, Salary End While Close New File Open SALARIES to read Open “SALARIES” For Input as Salary File While Not EOF (Salary File) Read Salary File, Employee, Salary Write Name, “ ”, Salary End While Close Salary File Do math

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Declare X [100] Set Sum = 0 Set Count1 = 0 While Salary <> 0 Set Count1 = Count1 + 1 Set X [Count1] = Num Set Sum = Sum + Num End While Set Average = Sum / Count1 Set Count2 = 0 Set Count3 = 0 For K = 1 Step 1 To Count1 If X [K] > Average Then Set Count2 = Count2 + 1 If X [K] < Average Then Set Count3 = count3 + 1 End If End For Display Results Write “The average is:” Average Write “The number of items above the average is: ”, Count2 Write “The number of items above the average is: ”, Count3...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern