Compute standard deviation and mean of an input file

This is a discussion on Compute standard deviation and mean of an input file within the C Programming forums, part of the General Programming Boards category; I just received this programming assignment and i was wondering if someone could at least get me started on it ...

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

    Question Compute standard deviation and mean of an input file

    I just received this programming assignment and i was wondering if someone could at least get me started on it and guide me through the steps, i would really appreciate it.

    IMG.pdf (this is the actual programming question)
    2.pdf (and this is an example of the output)

    the file in which it is talking about is just a general file there is no specific file to read off of, we're just supposed to pretend like there is one in our directory, i'm using the standard language in linux

    Thanks in advance much appreciated

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    The way that programming forums work is this:

    1) YOU show that you have some work on this assignment, by getting started. The assignment is yours, not ours. You figure out what you need to get started.

    2) When you get stuck on some problem, post up your C code, and we'll try to help.

    That saves a lot of time for us (not for you, but that's life, eh?) and lets the forum stay focused on the C issues, rather than figuring out what your assignment really is asking for, etc.

    Without showing your work to get started, it's very rare that anyone will just jump in and do your assignment for you, or even "get you started".

    We need you to get things started -- you're the one in the class, reading the book, etc., not us.

    Take the lead.

  3. #3
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,425
    So what are your initial thoughts on what you think you will need to do?
    As you are Studying programming and presumably having done some study work prior to this, other assignments etc, you will have a knowledge of what is likely to be required?
    Having read the docs you posted I see there is plenty in the question paper itself to give you ideas and get going.
    And seeing that the data set will be rather small you do not even have to worry about screen formatting your output too much as it will probably fit easily in one go.

    guide me through the steps,
    I suppose that's the thing about programming really, there are no 'set steps' to complete any given problem, there are certainly recommended ways of doing FAQ style tasks but when it comes to a question paper (or actual project) that will contain custom requirements then that is where your ability as a programmer has to come into it, above and beyond the actual code you write you have to ask questions of your design and choice of approach from the outset, If you get it right, or almost right then things will go a lot more smoothly when managing the code part.
    Nowadays I am very reluctant to get typing code without a thorough design / pen and paper/ user story think through stage first. If nopt you can end up completing a load of work 'freehand' that is or becomes impossible to work with as the project develops
    Last edited by rogster001; 02-28-2011 at 09:04 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'"

  4. #4
    Registered User
    Join Date
    Feb 2011
    Posts
    4

    desperate

    i've been battling with this all night nothing is even coming up close, i'll pay someone peanuts if you program this for me not even joking.
    Last edited by Salem; 03-01-2011 at 01:31 AM. Reason: Fixed payment amount

  5. #5
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,467
    Quote Originally Posted by rasiegel View Post
    I just received this programming assignment and i was wondering if someone could at least get me started on it and guide me through the steps, i would really appreciate it.
    Wow, you expect us to believe that you "just received" it, and it was due in an hour and a half from when you posted? You take us for fools, then you have the gall to offer us a mere bagel to short you on a chance to learn a lesson in programming (it takes time) and life (sometimes you have to take your lumps for being lazy and procrastinating). You're only taking a 10% hit by turning it in a day late, so take the next 22 hours to make one hell of a good statistics program. Write a program worth 100% and you'll still walk out with a 90%, probably better than half the class, and the crap that would have been cranked out in 10 min for a quick muffin.

    Read some tutorials we have on this site: Cprogramming.com - Programming Tutorials: C++ Made Easy and C Made Easy
    Here are some things you'll need to do:
    1. Read the input file to count entries.
    2. Allocate enough space for an array of that many ints.
    3. Reread the file to store them in said array.
    4. Iterate through those elements, calculating the various statistics.

    Get started, and come back with a serious attempt and some serious questions, and you will get serious help.
    Last edited by Salem; 03-01-2011 at 01:32 AM. Reason: fixed payment amount

Popular pages Recent additions subscribe to a feed

Tags for this Thread


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