29
$\begingroup$

Given these four equations/inequalities:

1x=2
2x=4
3x=3
4x>8

What is x?

$\endgroup$

4 Answers 4

47
$\begingroup$

The answer is:

The "<" symbol

Why?

In some programming languages, "<=" means "is less than or equal to", and "<>" means "is not equal to".

$\endgroup$
4
  • 7
    $\begingroup$ From here: "Just for trivia, <> was chosen in some languages because it can be interpreted as "less than or greater than", or in other words, not equal." (The longer you live ...) $\endgroup$ Commented Jul 25, 2020 at 21:30
  • 5
    $\begingroup$ And <> is not necessarily the same as !=. Some objects it doesn't make sense to compare < or >. $\endgroup$ Commented Jul 25, 2020 at 22:11
  • $\begingroup$ Precisely correct! $\endgroup$ Commented Jul 25, 2020 at 23:16
  • 1
    $\begingroup$ Hah. And here I though it was about x being another representation of >< in a smaller print. $\endgroup$ Commented Jul 27, 2020 at 10:31
17
$\begingroup$

Answer: x is

a variable (as in programming)

That's because

the given "equations/inequalities" are in fact (some dialect of) BASIC code, so 1,2,3,4 at the beginning of the each line are just labels/line numbers. So, it's a perfectly valid program consisting of 3 assignments (lines 1-3) to the same variable x and 1 comparison in line 4 (the result of which is not assigned to any variable). Better formatting and comments:


 1 x = 2 'assign 2 to x (creating a new variable, declaration is not required in BASIC)
 2 x = 4 'assign 4 to x
 3 x = 3 'assign 3 to x
 4 x > 8 'compare x with 8, returning false (0)
 

P.S.

If x is required to be a number, my answer is x = 3 (this will be the value of x after running this code).

$\endgroup$
2
  • 4
    $\begingroup$ Very clever! Headed in the right direction, but not what I was going for. Also, your P.S. is not necessary, because rot13(k vf abg n ahzore) $\endgroup$ Commented Jul 25, 2020 at 7:55
  • 1
    $\begingroup$ rot13(vs vg jnf onfvp gurer jbhyq unir orra fcnprf orgjrra gur ynoryf/yvar ahzoref naq gur pbzznaqf) $\endgroup$ Commented Jul 25, 2020 at 10:56
4
$\begingroup$

X could be operator (IS NOT)

!

Because

1x=2
2x=4
3x=3
4x>8

are always either true or false conditions in any programming language.

1!=2    //Always True
2!=4    //Always True
3!=3    //Always False
4!>8    //Always True
$\endgroup$
3
  • 1
    $\begingroup$ Huh? What language supports !> ? $\endgroup$ Commented Jul 28, 2020 at 0:14
  • $\begingroup$ @LorenPechtel You are right .. thank you for ponting out mistake. $\endgroup$ Commented Jul 28, 2020 at 2:19
  • 3
    $\begingroup$ @LorenPechtel T-SQL $\endgroup$ Commented Jul 28, 2020 at 8:13
2
$\begingroup$

x could be:

(π/2)!

where the

! is a not operator

$\endgroup$
3
  • $\begingroup$ ! seems more like a factorial in the last context at least. $\endgroup$ Commented Jul 26, 2020 at 16:03
  • $\begingroup$ Seconded--! as negation precedes, not follows. Trailing it only means factorial. $\endgroup$ Commented Jul 28, 2020 at 0:15
  • $\begingroup$ @LorenPechtel In the context, the first line would be read 1(p/2)!=2 where "!=" means "not equals". $\endgroup$ Commented Jul 28, 2020 at 8:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.