1. ## conditions

Write a condition to express the following:

X is strictly between -10 and 10.
Exactly one of X and Y is greater than 6.
Both X and Y are positive or both X and Y are negative.  Reply With Quote

2. ## Re: conditions

could you please tell more about your case? when will this happen? X and Y should be assigned random values matching this conditiones? or what?  Reply With Quote

3. ## Re: conditions

maybe this could help

VB Code:
```If (x >= -10) And (x <= 10) Then
'x is between -10 and 10
Else
'x is not between the 2 values
End If
If (x > 6) Or (y > 6) Then
'one or both x and y > 6
End If
If (x >= 0) And (y >= 0) Then
'both x and y are positive
ElseIf (x <= 0) And (y <= 0) Then
'both x and y are negative
End If
'they have different signs
End Sub```  Reply With Quote

4. ## Re: conditions Originally Posted by d3gerald
maybe this could help

VB Code:
```If (x >= -10) And (x <= 10) Then
'x is between -10 and 10
Else
'x is not between the 2 values
End If
If (x > 6) Or (y > 6) Then
'one or both x and y > 6
End If
If (x >= 0) And (y >= 0) Then
'both x and y are positive
ElseIf (x <= 0) And (y <= 0) Then
'both x and y are negative
End If
'they have different signs
End Sub```
That is all the information I have on this question. Thanks for your response.  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•