Help!

This is a discussion on Help! within the C++ Programming forums, part of the General Programming Boards category; Hello! I really need help. I'm currently taking a course in C++ and I am using an awful textbook to ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    7

    Question Help!

    Hello!

    I really need help. I'm currently taking a course in C++ and I am using an awful textbook to get me through it. I just started a new job and I'm exhausted, so the last thing I want to be struggling with is a midterm. I'm sure that most of you will find these assignments very trivial, however, I'm having a VERY hard time. For those of you who don't mind posting or emailing code, I would GREATLY appreciate it. I honestly don't think I will ever use C++ again in my lifetime, so you won't be doing me a disservice by working the code out for me. I promise!! I'm not going into programming, I'm looking more at a Network Admin job, or something along those lines. At this point, I don't think I would even accept a job that required me to do any programming. I took VB last term and actual got it and did well, unfortunately I can't say the same for C++. So PLEASE help me, I want to pass the course, but I can't write the code.

    I have one assignment partially done except for the errors, I have attached it. Please help me work out the errors, I don't have a clue what to do.

    Here's the second assignment, for those of you who might like to code it for me. I'm terrible with arrays.

    You are asked to write a C++ program that can be used to determine grades at the end of the semester. For each student, who is identified by an integer number from 1 to 20, four examination grades must be kept. The final average is determined by simply averaging the four examination grades. You must allow the input of student grades via the keyboard. You are to construct a 20 x 6 two dimensional array in which the first column represents the student number, the 2nd through the 5th the examination scores, and the 6th column the final average. The following data is provided for verification of your program.



    Student Exam 1 Exam 2 Exam 3 Exam 4
    1 100 100 100 100
    2 100 0 100 0
    3 82 94 73 86
    4 64 74 84 94
    5 94 84 74 64

    THANK YOU THANK YOU THANK YOU!!!


    Attached Files Attached Files

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Wow, deja vu....

    Ok, so how far have YOU got in your code, EXACTLY what part don't you understand and what are the ERROR messages that you're getting that you don't understand?

    **edit** about just looking for a Net Admin job, don't be so sure: That's how I started at my current job. I was offered extra money to help the dev team. A few raises and years later I head the dev team. Much more money and a lot less headaches (or at least, easier to deal with headaches) as a developer. I still help with the Net Admin stuff when they need it, but I'm not the one who has 84 people trying to choke me when the email server is down, etc. (not to mention the $8k a year difference in salary (after only 2 years) + extra vacation time).
    Last edited by jdinger; 02-27-2003 at 10:01 PM.

  3. #3
    Registered User
    Join Date
    Feb 2003
    Posts
    7

    Talking

    To be honest, I really don't understand any of it. I attached the program so you could see all the errors I'm getting. I got rid of the ones I knew how to get rid of, but the ones that are left, I don't have a clue how to get rid of them. A friend of mine wrote the code for the student grade program, but the program I have attached is still in need of some serious debugging. I was just hoping somebody might help me out with that. A lot of the problem seems to be in my case statement. I can't see where there's anything wrong with it. I have once again attached the program for your viewing pleasure, thanks for your reply! Oh wait, there's not an option for me to attach anything on a reply. Oops, the initial post has the attachment if you want to check it out. Thanks!!
    Last edited by kje424; 03-01-2003 at 12:24 PM.

  4. #4
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Posts
    1,065
    Take a close look at this area here:
    Code:
    case 12: cout << "December "; break;
    }
    
    cout<<" "< //Prints day of week
    
    case 1: cout << "Tuesday\n"; break;
    See the closing "}" from the first switch block (the one for month)?

    Well after that you have 2 problems. First of all your cout line
    there is incomplete. You have an extra "<" at the end. I'm
    guessing you wanted it to read: "cout<<" "<<endl"?

    Secondly, you start a 2nd switch block for the day but you never
    use the switch statement. You list the cases but you forgot to put
    "switch(day) {" above "case 1: cout<<"Tuesday\n";break;"

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    1,640

    Re: Help!

    Originally posted by kje424

    Here's the second assignment, for those of you who might like to code it for me. I'm terrible with arrays.
    It's not allowed to request for entire programs, Besides, You're
    the one supposed to program it not us. I have no problem
    doing it, Since it's a nice excersize, However you'll get in real
    trouble later when you have to program it yourself.

  6. #6
    Registered User
    Join Date
    Feb 2003
    Posts
    7

    Smile

    I honestly don't plan on doing anymore programming in my lifetime. Seriously, it's just not for me. I have Exercise 2 done, the student grade average assignment. I'm trying to debug Exercise 1 right now, and getting some help on that as we speak. Thanks so much!

  7. #7
    Registered User
    Join Date
    Feb 2003
    Posts
    7
    ok, I have all the errors out but when I type in a date that I know is a friday, it just prints out the month. ??

  8. #8
    Registered User
    Join Date
    Feb 2003
    Posts
    7
    Got it! Thanks! Putting that switch in took me down to one simple error. I made a couple of changes and it's done. Thanks again for all who replied!

  9. #9
    Registered User
    Join Date
    Feb 2003
    Posts
    7
    sure, it's working now and i have turned it in. but, i'm glad to show you the program.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    Feb 2003
    Posts
    7

    Talking

    Well, I'll check back later. It's now time to tackle Psychology, which is MUCH easier! Thanks again to all of you! You're wonderful to even reply.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21