Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

c++ programming

Name: Anonymous 2013-05-17 22:47

any programmers here?

I just need some real quick help, this is my third assignment of my 100 level programming course (c++), and I have an array of integers with 5 places.

One question asks me to find:
"The sum of the five values if at least three of the values are the same, otherwise 0"

Is there some easy way of doing this without doing
if (value[0] = value[1] & value[0] = 2 || value[1] = value[2]) etc?

I'm stuck as hell on this question any help would be great

(im using g++ compiler if it makes a difference)

Name: Anonymous 2013-05-17 22:56

That was /g/ quality.

Name: Anonymous 2013-05-17 23:01

>>1
Sum my anus.

Name: Anonymous 2013-05-17 23:10


N=5,V=3;
qsort(v,N,sizeof(v[0]),cmp);
for (i=1; i<N; i++) {
  if (v[i-1] == v[i]) j++;
  else j = 0;
  if (j == V) return sum(v,N);
}
return 0;

Name: Anonymous 2013-05-17 23:21

>>1
Nope no programmers here. This board is meant for Jews and Jewish discussion. I can see why you were confused. PROG is actually an acronym for People Really Obey God.

Name: Anonymous 2013-05-18 0:21

That's probably the best way to do it.

Name: Anonymous 2013-05-18 0:33

Really punish!

Name: :3 2013-05-18 12:25

>>7
...my anus!

Name: Anonymous 2013-05-18 13:48

any programmers here?
no

back to /g/ please

Name: Anonymous 2013-05-18 14:22

0/10

Name: Anonymous 2013-05-18 14:37

>>10
9/11

Name: Anonymous 2013-05-18 20:45

This is a perfect task for J.
   (([:+./3<:[:+/[:=/~[)*+/)1 2 3 3 3
12
   (([:+./3<:[:+/[:=/~[)*+/)1 2 3 3 4
0

Name: !!MHunJfxrl9xFoNG 2013-05-20 8:22

asd

Name: Anonymous 2013-08-31 7:20


I never got much into team sports, but I enjoy solo sports as a test of my own fitness and skill. I weightlift and I am hoping to get back into running once spring rolls around.

Name: Anonymous 2013-08-31 8:05


I'll be there for a while so, what should I take?
I've been told scotch is rare/expensive in Japan.  Anything else?

Name: Anonymous 2013-08-31 8:51





    I HATE NIGGERS

Don't change these.
Name: Email:
Entire Thread Thread List