In some need of some serious help in converting this pseudo code into C#:

start
Declarations
    num deptNum
    num salary
    num hrsWorked
    num SIZE = 7
    num totalGross[SIZE] = 0
    string DEPTS[SIZE] = “Personnel”, “Marketing”,
                   “Manufacturing”, 
                   “Computer Services”, “Sales”, 
                   “Accounting”, “Shipping”
getReady()
while not eof
            detailLoop()
endwhile 
finishUp()
stop

getReady()
    output “Enter the department number, hourly salary, and number of 
  hours worked”
input deptNum, salary, hrsWorked
return

detailLoop()
        if deptNum >= 1 AND deptNum <= SIZE then
            totalGross[deptNum-1] = totalGross[deptNum-1] +                                 (hrsWorked * salary)
        else
            output “Invalid department number”
        endif
output “Enter the department number, hourly salary, and number of 
  hours worked”
input deptNum, salary, hrsWorked
    return

    finishUp()
deptNum = 0
while deptNum < SIZE
    output deptNum+1, DEPTS[deptNum], totalGross[deptNum]
    deptNum = deptNum + 1
endwhile
    return

Any and all help will be appreciated.
Thanks,
PickledPepper6

All I have done is set up public bool's for isvalid, ispresent, iswithinrange, and set up a calculator for the gross pay too. I have no idea how to make it output a list of the seven departments in the company (numbered 1 through 7) and the total gross payroll (rate times hours) for each department.

I have to organize each employee entered (firstname and lastname) based on their department and then sum up the total per department

MSDN is a great resource to get started.
In this article you will find info on how to convert your DEPTS array on line 8 into a legitimate C# line. Success!

This article has been dead for over six months. Start a new discussion instead.