Thread: Pseudo Code (Please Help)

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    24

    Pseudo Code (Please Help)

    I need Pseudo Code:

    1. Declare variables
    2. Accept Input – weeklySales
    3. Calculate Gross Pay = Weekly Sales * .07
    4. Calculate Federal Tax = Gross Pay * .18
    5. Calculate Social Security = Gross Pay * .06
    6. Calculate Retirement = Gross Pay * .1
    7. Calculate Total Deductions = Federal Tax + Social Security + Retirement
    8. Calculate Total Take Home Pay = Gross Pay – Total Deductions
    9. Display the following on separate lines and format variables with $ and decimal
    a. Total Sales Amount: value of weekly sales
    b. Gross Pay (.07): value of gross pay
    c. Federal Tax paid (.18): value of federal tax
    d. Social Security paid (.06): value of social security
    e. Retirement contribution (.1): value of retirement
    f. Total Deductions: value of total deductions
    g. Take Home Pay: value of take home pay

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What is your question? Also, what exactly does this have to do with C++, e.g., are you asking for help in translating some pseudocode related to what you posted into C++?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Humorous Code
    By DavidP in forum General Discussions
    Replies: 16
    Last Post: 08-28-2010, 10:40 AM
  2. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  3. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  4. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM
  5. Replies: 0
    Last Post: 02-21-2002, 06:05 PM