Thread: PLEASE HELP! homework do in an hour!

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    5

    Exclamation PLEASE HELP! homework do in an hour!

    I am taking a principles of programming class but i couldn't afford the book until now. I am completely lost in this class and I don't understand c++ and algorithms at all! this is what i have to do:

    //Algorithm 6.5
    Code:
      Set TotalTax to 0
      Set TotalGrossEarnings to 0
      Set TotalMedicalLevy  to 0
      Set TotalEarnings to 0
      Display Heading
      Read Employee Record
      DOWHILE more records
        GrossEarnings = Hours * Rate
        TaxPayable = GrossEarnings * 0.15
        MedicalLevy = GrossEarnings * 0.01
        NetEarnings = GrossEarnings - TaxablePay - MedicalLevy
        TotalGrossEarnings = TotalGrossEarnings + GrossEarnings
        TotalTax = TotalTax + TaxPayable
        TotalMedicalLevy = TotalMedicalLevy + MedicalLevy
        TotalEarnings = TotalEarnings + NetEarnings
        Display EmployeeNumber, GrossEarnings, TaxPayable, MedicalLevy, NetEarnings
        Read Employee Record
      ENDDO
      Display TotalGrossEarnings
      Display TotalTax
      Display TotalMedicalLevy
      Display TotalNetEarnings
    can some one PLEASE HELP! ! ! its do today

  2. #2

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    5
    I dont expect someone to do it for me, i just cant finish this if i dont even know where to start!

  4. #4
    Registered User
    Join Date
    Feb 2011
    Posts
    5
    I dont expect someone to do it for me, i just cant finish this if i dont even know where to start!!

  5. #5
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,472
    Go away and do some work, you still have an hour, get organised and actually do some study before your next assignment and maybe you wont find yourself in this position again,

    Most members find it very irritating when requests like this are posted, people that have worked hard to develop their skill being asked to help OPs that just want a certificate out of their course with minimum effort?

    but i couldn't afford the book until now
    But you do have an internet connection that would have helped you in the short term i am sure to complete the work, there are a wealth of programming tutorials that could easily have been studied
    Last edited by rogster001; 02-25-2011 at 10:38 AM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    Stroustrup:
    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  6. #6
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    You've been given the entire algorithm!

    Code:
    int main()
    {
        // Your code here
        return 0;
    }

  7. #7
    Registered User
    Join Date
    Feb 2011
    Posts
    5
    yea i fully understand where you coming from but i just finished buying my book and connecting my internet this week because i was waiting for my financial aid to be approved. Im not poor but I have had some financial problems. You have to understand that i chose to take this class for a reason-because i wanted to learn it! But its been a rough start starting the first 5 weeks without a book. But anyways I have tried to understand it. something im having trouble with is the green words that go on the top.. example:

    #include <iostream>
    #include <cstdlib>
    #include <string>
    #include <fstream>
    #include <iomanip>

    is there a place i can start learning some of this from zero?

  8. #8
    Registered User
    Join Date
    Feb 2011
    Posts
    5
    Quote Originally Posted by rags_to_riches View Post
    You've been given the entire algorithm!

    Code:
    int main()
    {
        // Your code here
        return 0;
    }
    thank you bro. but dont i have to add the #include <iostream> at the top? im taking some baby steps so sorry if i sound dumb!

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You sure there are no beginner books at a local library?
    It sucks that you have been put into a situation where you couldn't get your book. It truly sucks. But there is only so much we can do.
    There is so much to learn, and we just don't have the time or the will to teach a beginner frm the very beginning. If we did, we'd be teachers.
    Sorry. But I suggest you get a book and try to catch up later in the course or redo it another time.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    I'm sure he had plenty of time to learn this, but he was ignoring it until the first assignment was given.

  11. #11
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Stop assuming things. It's rude and detrimental to one who is accused without evidence.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  12. #12
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    Quote Originally Posted by Elysia View Post
    Stop assuming things. It's rude and detrimental to one who is accused without evidence.
    I don't know about you, but I'm a student as well and for me his situation is more than obvious. I hear such excuses every day. I don't assume anything, I just know it.

    He says that he can't afford a book. Is it so hard to open wikipedia and get hello world? For someone who would really want to learn it, even the internet alone would be enough.

    Do you think his teacher said "please do this" without explaining anything? I doubt.
    He probably didn't even try to google anything. I even doubt he has been given only an hour, please...
    Last edited by kmdv; 02-25-2011 at 12:13 PM.

  13. #13
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I am a student, too, and you are assuming, because you don't know this individual. So unless proof is given, give the benefit of doubt. Or don't reply at all.
    Put yourself in the shoes of the one you are being rude to and see how you will feel.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I am a student, too, and you are assuming, because you don't know this individual. So unless proof is given, give the benefit of doubt. Or don't reply at all.
    Put yourself in the shoes of the one you are being rude to and see how you will feel.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    Quote Originally Posted by Elysia View Post
    So unless proof is given, give the benefit of doubt. Or don't reply at all.
    Your way of thinking is typical for programmer. Maybe proofs are essential in programming (as in science in general), but in situations like this you shouid turn off your binary thinking for a moment, since you will never have a proof.

    To be clear, let me explain it in your preferable - binary format:
    - I don't know this individual.
    - You don't know this Individual.
    - We (or at least I) know many other individuals.
    Based on my expierience, chance that he is telling truth is very small, could say near 0. Yes, near 0 equals 0, time to turn off binary thinking here.

    Quote Originally Posted by Elysia View Post
    Put yourself in the shoes of the one you are being rude to and see how you will feel.
    Maybe I will feel bad, but I will be given more experience and probably will not beg for homework again (at least here), thus this is not detrimental.

    I admit that my post can be considered spam, but I see many like this on this board, so forgive me.

    EDIT:

    Look at the topic tags - "begginer" for "begging".
    Last edited by kmdv; 02-25-2011 at 12:57 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Entry Level Help.
    By alex1067 in forum C Programming
    Replies: 21
    Last Post: 03-11-2008, 05:13 PM
  2. function returning hour in either 12 or 24 hour format
    By stanlvw in forum C Programming
    Replies: 4
    Last Post: 01-01-2008, 06:02 AM
  3. Roidian: Final Hour (72 hour gd compo results)
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 12-29-2004, 10:27 PM
  4. Homework
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 11-03-2001, 04:39 PM
  5. Homework
    By kermi3 in forum Windows Programming
    Replies: 5
    Last Post: 09-15-2001, 11:48 AM

Tags for this Thread