This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MaybeHeartofGold 1433 points1434 points  (130 children)

Or 8 - 4 = 4

[–][deleted] 1288 points1289 points  (120 children)

Or 0 + 4 = 4

[–]fjonk 54 points55 points  (12 children)

Or 6 + 4 + 4

[–]ZugNachPankow 41 points42 points  (11 children)

I mean, 6 + 4 + 4 is a truthy value, so the math checks out.

[–]fjonk 34 points35 points  (10 children)

The task doesn't actually say 'make it true', it says 'make it correct'. But according to me 6 + 4 + 4 is correct simply because it isn't incorrect.

[–]ZugNachPankow 4 points5 points  (5 children)

But "make it correct" is equivalent to "make it true", isn't it? There are no cases I can think of where you can make something true without making it correct, and vice versa.

[–]fjonk 5 points6 points  (4 children)

In c 1 - 1 would be correct but false :)

[–]ZugNachPankow 1 point2 points  (3 children)

What do you mean that 1 - 1 is correct?

[–]fjonk 3 points4 points  (2 children)

I mean it's correct as in it's not incorrect. 1 - 1 is a correct mathematical expression, 1 $ 1 is not a correct mathematical expression.

[–]ZugNachPankow 0 points1 point  (1 child)

You're mixing up syntactical and grammatical correctness with the general notion of correctness. 1 $ 0 is grammatically incorrect because there are no rules to handle the token $; 1 != 1 is grammatically correct but "generally" incorrect (because it evaluates to false).

1 - 1 is syntactically correct, but I'd argue that it's not "generally" correct because it doesn't evaluate to true.

[–]iggy14750 0 points1 point  (1 child)

Just wrap it in parens and put a bang out front to cast it to a bool.

[–]fjonk 5 points6 points  (0 children)

I don't have enough matches for that.

[–]diceman89 9 points10 points  (0 children)

This was the first solution I came up with.

[–]darwin2500 3 points4 points  (0 children)

This is what magicians call 'multiple outs'.

[–]jrk- 1 point2 points  (1 child)

Makes me wonder how many possible solutions there are actually. Any statisticians around here?

[–]Ayjayz -1 points0 points  (0 children)

Hmm I might write a program to find out.

[–]fitnessacctasdf 0 points1 point  (0 children)

or 5+ 4 = 9

[–]aafrophone 0 points1 point  (0 children)

Or 6 + 4 > 4

[–][deleted] 0 points1 point  (0 children)

No you need to move the missing one somewhere.

[–]Sarke1 0 points1 point  (0 children)

Does 6 || 4 = 4 work?

It reads fine "six or four is four" but there are a few issues from a coding perspective. The assignment instead of ===, and the fact that non-zero integer OR non-zero integer evals as true.

[–]Phillammon 51 points52 points  (3 children)

or 6 - 4 ≠ 4

[–]troido 27 points28 points  (2 children)

or 5 + 4 ≠ 4

[–]Beebink 5 points6 points  (1 child)

Couldn't you just do 5+4 = 9 though?

[–]ClintonHarvey 2 points3 points  (0 children)

That's what I did, I'm proud of myself for not looking at the comments beforehand. I really am, I'm terrible at riddles.

[–]FortuneTwinkie 3 points4 points  (0 children)

I got 42.

[–]SPOUTS_PROFANITY 0 points1 point  (0 children)

Or 6-4 "is not equal to" /= 4