A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 4 years ago

1. Read in a parameter value n which will indicate how many terms should be analyzed. This will be followed by n groups of data each containing information about 1 product. Each group of information will contain the name of the item and then 4 numbers indicating the profit (or loss) made on that item during the 4 quarterly reporting periods. For example, one data group could be: Diskettes 32 63 -12 84 or Printers -23 564 45 75

  • This Question is Closed
  1. farmdawgnation
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    So, I'm not going to do your assignment for you - but if you have specific questions about the assignment, I will answer those for you.

  2. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    That's not nearly the whole assignment; that's one of 6 parts, plus I've got to make up all the data myself. What I need is guidance, yes, thank you very much. So n will be the number of products, each having its own set of data. I need you to fill in the gaps, basically. The data is to be read from an external file, so how do I do that? Then how do I print the data as it is read in, in the form of a table with one row for each item and one column for each reporting period?

  3. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    What's the programming language you're supposed to use? You'll likely want to put the data in a text file so you can easily read it from your program. You could use spaces to separate the individual pieces of data, as shown above. When reading the data, you're reading a text file, so the data is going to come in as strings that you can then readily print. I'd use a 2-dimensional array to store the data in when reading it - you could then store the data in the array in the same order as they're in the file, and simply iterate over the array with two nested loops to print it.

  4. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    C++ I guess. That's what I was going to do (read in from text file). Then the parameter value n should be read in from the beginning of the text file, right? I already wrote out the text file with the data separated as in the example...

  5. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Here's the entire assignment http://www.webdeveloper.com/forum/showthread.php?p=1190886#post1190886

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.