Thread: CS1 Program (New Problem)

  1. #1
    Registered User
    Join Date
    Aug 2010

    CS1 Program (New Problem)

    It is a matchmaking program where it compares two individuals rating of each other to calculate their "likability" and then arranges the entire group according to the best overall likability.

    My problem is that when num_each is 4 or 8 my program crashes. (num_each represents the number of pairings there are, i.e. 4 men 4 women then num_each = 4)]

    I have a conditional statement that blocks the code from receiving a 4 right now but I'd prefer to fix it.

    My program works for 1,2,3,5,6,7,9,10 (10 is max) so I don't see what could possibly cause those two to crash. Any ideas? I know you probably want to see my code but I don't think it'd be safe to post it because someone could copy it and then I wouldn't get credit.
    Last edited by DaNxTh3xMaNx; 09-29-2010 at 06:03 PM.

  2. #2
    ... kermit's Avatar
    Join Date
    Jan 2003
    I am certain that nobody here can read minds, so perhaps you could post your code. Otherwise, we are unable to help.

  3. #3
    Registered User
    Join Date
    Aug 2010
    Ah crap. I don't want to get a 0 because someone comes here and copies my code so I guess I'll just try to figure it out on my own within the next 3 hours. Sorry for wasting your time.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    > I don't want to get a 0 because someone comes here and copies my code
    So how is that different from one of us posting an answer, you handing it in (along with x other lurkers)?

    The difference is, you can prove originality by showing you posted first and any resemblance to others is because they copied you.

    Or is there a "allowing others to copy your work" is just as bad as copying to begin with?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multi Thread Program Problem
    By ZNez in forum C Programming
    Replies: 1
    Last Post: 01-03-2009, 11:10 AM
  2. Program Termination Problem
    By dacbo in forum C Programming
    Replies: 3
    Last Post: 01-23-2006, 02:34 AM
  3. Replies: 20
    Last Post: 06-12-2005, 11:53 PM
  4. Console Program Problem
    By Breach23 in forum C++ Programming
    Replies: 3
    Last Post: 10-19-2001, 12:35 AM