1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

New to C programming, need help

Discussion in 'C' started by C-user, Oct 19, 2011.

  1. C-user

    C-user New Member

    Joined:
    Oct 19, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hello everyone,

    I am new to C programming, does anyone have idea how to do this? The actual question is much longer than this, i edited the question to make it shorter just to understand the concept. Hope somebody could show me the proper way to develop the answer for the question.


    The following Table 1 that manipulates a two-dimensional array stores the work hours for three employees. Each row stores the employee’s three-day work hours with four columns. Write, run and test a C program that reads the hours, calculates total hours and salary and displays all fields, employee’s total hours and salary.

    Note: Day1 and Day 2 salary rate: RM4.50 per hour
    Day3 salary rate: RM8.00 per hour

    PTimer........Day1........Day2........Day3
    Max.................4 .............3.............2
    John................2..............2.............2
    Jane................3 .............4.............4
    TABLE 1

    Sample Output:

    Ptimer.....Day1.....Day2.....Day3.....Total Hour.....Salary
    Max.............4...........3..........2..............9..........$47.50
    John
    Jane

    TABLE 2
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    You took lot of effort to have those white dots for multiple spaces but you could use the Code BBCode
     

Share This Page