This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

good code bad answer

my code is 110% correct; eg no errors and runs properly. see.

int _val;

int myfunc2(int val)
{
  _val = val;
   return _val;
};

int Bar(int val)
{
  return _val + val + 1;
};

void myfunc1(int val)
{
  _val += Bar(val);
};

etc
etc
etc

it doesnt give me the right answer sometime.

HEEEEEEEELLLLLLLPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP

Parents

  • You did not ask any question!

    Again:

    You just showed a few function definitions; you didn't shown how you combine all that into a real program.

    You didn't explain what you think should be the "right" answers.

    You didn't explain what answers you get - and why you think they are "wrong".

    "You all hijak my thread"

    Actually, you abandoned your thread!

    You showed no interest whatsoever for 6 days - so is it any surprise that it wandered off-topic?!

    If you want to keep the thread on-track, it's up to you to engage with the discussion!

Reply

  • You did not ask any question!

    Again:

    You just showed a few function definitions; you didn't shown how you combine all that into a real program.

    You didn't explain what you think should be the "right" answers.

    You didn't explain what answers you get - and why you think they are "wrong".

    "You all hijak my thread"

    Actually, you abandoned your thread!

    You showed no interest whatsoever for 6 days - so is it any surprise that it wandered off-topic?!

    If you want to keep the thread on-track, it's up to you to engage with the discussion!

Children