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

help on salary practice problem

Discussion in 'MFC' started by imported_ade161, Sep 1, 2010.

  1. imported_ade161

    imported_ade161 New Member

    Joined:
    Sep 1, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    so here is the practice problem.

    Effective January 1st of each year, Gabriela receives a 5% raise on her previous years's salary. She wants the program to calculate and display the amount of her annual raises for the next three years. The program should also calculate and display the her total salary for three years.



    here is what i have so far( in this problem i am trying to use the while statement in my pseudo code)




    Input:
    annualSalary

    Processing Items:
    Year
    New salary
    totalSalary

    Algorithm:
    1. enter the annual salary
    2. repeat while (number of years are 1 to 3)
    Calculate the annual raise by multiplying the annual salary by 5%

    Display the annual raise
    3. calculate the new salary by adding the new salary to the annual raise
    4. calculate the total salary by adding the total salary to the new salary
    end repeat
    5. display total salary


    Output:
    annualraise
    totalSalary


    are my input, processing items, and output for the problem correct?
     

Share This Page