help writing a program

Discussion in 'C' started by ade161, Nov 2, 2010.

  1. ade161

    ade161 New Member

    Joined:
    Nov 2, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    i need your help in creating a program that allows the user to enter a payroll code. The Program should search for the payroll code in the code in the file and then display the appropriate salary. If the code is not in the file, the program should display an appropriate message. Use a sentinel value to end the program.

    if you can write it would be greatly appreciated
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    Here's a start:
    Code:
    int main()
    {
      int payroll, salary, cont=1;
      while (cont)
      {
        getPayrollCode(&payroll);
        getSalary(payroll, &salary);
        if (getUserReq())
          cont=0;
      }
      return 0;
    }
    
    now you need to write functions getPayrollCode(), getSalary() and getUserReq().
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice