Originally Posted by

**Swarvy**
No, you weren't. In fact I think you probably deserve an award for the most poorly posed question of all time.

You deserve an award for the most sympathetic and charming person then. And I am being ironic.

Code:

As previously stated. We don't just hand out code. The whole point of this forum is to learn, which means that if you want our help you have to post an initial attempt and we will help you from there.

I've seen many many code handouts, and I've been around for a couple of days only.

But I get your point, and I'm not expecting you to code a whole program for me, nor did I ever intend you to. I never said "code this", did I?

Anyways, here goes what I'm trying to do, in a "neanderthal" way:

Code:

if(vector[1]==2 && vector[2]==**1** && vector[3]==**1** && vector[4]==**1**)
{printf("There are at least 3 vector positions with the value 1");}
if(vector[1]==**1** && vector[2]==2 && vector[3]==**1** && vector[4]==**1**)
{printf("There are at least 3 vector positions with the value 1");}
if(vector[1]==**1** && vector[2]==**1** && vector[3]==2 && vector[4]==**1**)
{printf("There are at least 3 vector positions with the value 1");}
if(vector[1]==**1 **&& vector[2]==**1** && vector[3]==**1** && vector[4]==2)
{printf("There are at least 3 vector positions with the value 1");}

Now, imagine the above, with a 40 positions vector in which I need, say 15 positions to be = 1. I'd be years to do so. So my questions is, if any of you happen to know a simpler way to do this. Thanks.