CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2011
    Posts
    3

    C++ Looping assignment

    I have an assignment given to me since I'm trying to learn C++ but I don't know how I can to put it into code. I'm having a little bit of a problem with loops and am wondering if I could get some help.

    Here is what I need

    Diver's name, City
    JudgeScore1 - Scores are entered from 1-10
    JudgeScore2
    JudgeScore3
    Judgescore4
    Judgescoe5
    DegreeOfDifficulty - Assigned once for each diver
    OverAllScore - Individual's scores totaled and then divided degree of
    difficulty. Highest and Lowest Scores are removed as they are often skewed entires.
    DegreeOfDifficulty - Degree of difficulty ranges from 1.00 to 1.67
    Display the diver's information and overall score

    Then list the number of divers and the average of the overall scores

    Which variables would I need to define? How would I go about doing this?

  2. #2
    Join Date
    Oct 2011
    Posts
    59

    Re: C++ Looping assignment

    What are the steps you would do if you were to tell a very dense person to do this? What information will they need to remember from one step to the next?

    Writing psudocode like this is a very effective way of trying to understand the problem and find a solution.

    BTW, we don't do your homework for you, but if you have problems and you try, then find out you can't figure out how to do something, explain what it is you are having trouble with. Include a small code piece that shows your attempt and describe what your problem is. If you can break down the problem into a small isolated segment of code, you may find that you may come up with your own solution.


    A

  3. #3
    Join Date
    Nov 2011
    Posts
    3

    Re: C++ Looping assignment

    Sorry about that, I wasn't expecting homework done just help.

    I'm still a beginner in C++. I'm having issues with a few portions of the code.

    How do I define the names of the divers?

    And how do I properly use a nested loop?

    Thanks in advanced.

  4. #4
    Join Date
    Jun 2009
    Location
    France
    Posts
    2,513

    Re: C++ Looping assignment

    Quote Originally Posted by TheRayMan54 View Post
    Sorry about that, I wasn't expecting homework done just help.

    I'm still a beginner in C++. I'm having issues with a few portions of the code.

    How do I define the names of the divers?

    And how do I properly use a nested loop?

    Thanks in advanced.
    Your questions can be answered in this tutorial. If you still have questions after reading it, I can help.
    Last edited by monarch_dodra; November 14th, 2011 at 04:56 AM.
    Is your question related to IO?
    Read this C++ FAQ article at parashift by Marshall Cline. In particular points 1-6.
    It will explain how to correctly deal with IO, how to validate input, and why you shouldn't count on "while(!in.eof())". And it always makes for excellent reading.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured