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.
Printable View
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.
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?
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.Quote:
Originally Posted by d3gerald