-2
$\begingroup$

How to get 10 in computer science, using the number 4 exactly four times, and two signs exactly and two operation + exactly ?

$\endgroup$
1
  • $\begingroup$ I’m voting to close this question because it belongs on Puzzling. $\endgroup$ Jun 26 at 7:53
1
$\begingroup$

Let the function 4 (x) be such that:

4 (4) = 2 for x = 4.

4 (8) = 6 for x = 8.

4 (12) =10 for x = 12.

We have 3 solutions:

4 (4) +4+ 4 = 10

4 (4+ 4) + 4 = 10

4 (4 +4 +4) = 10

There are exactly four 4 and exactly two signs and exactly two additions, and it is computer programmable.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.