*useful*problems.

- katastrofa
**Posts:**8621**Joined:****Location:**Alpha Centauri

How men invented *useful* problems.

- Cuchulainn
**Posts:**60753**Joined:****Location:**Amsterdam-
**Contact:**

a/b == 0 hmmm.. Implementation-dependent.Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers.Code: Select all`int main() { int a, b, c, d, answer; a = 1; b = 3; c = 4; d = 6; answer = a/b + c*d; printf("The answer is %d\n",answer); } // output: The answer is 24`

24 is a highly composite number, just like 5040. Coincidence?

http://www.datasimfinancial.com

http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..

R. van Gulik

http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..

R. van Gulik

My guess is that such a solution is not possible if we are limited to +, -, /, * operations. I don't know enough Maths to prove or disprove this. As a newcomer to programming, I tried to have a crack at this in Python. I found 23, 23.(6), 24.(3), 25 but no 24.

- katastrofa
**Posts:**8621**Joined:****Location:**Alpha Centauri

You need to use the mathematics of quantum neutrino fields!

Hmm, what about the same problem but with numbers 8,6,7,5,3,0,9?

- Cuchulainn
**Posts:**60753**Joined:****Location:**Amsterdam-
**Contact:**

http://www.datasimfinancial.com

http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..

R. van Gulik

http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..

R. van Gulik

- katastrofa
**Posts:**8621**Joined:****Location:**Alpha Centauri

"or" in your post gets me somewhat confused. has one to use the 4 operators?Write 24 using 1, 3, 4 and 6 and +, -, *or/ operators. You have to use all 4 numbers.

It's all right guys. It's OK not to know the answer.

my answer would be 6/(1-(3/4)) that i got by brute force, but i’m not sure whether you require the all 4 arithmetics operators to be used (game statement is ambiguous for non English-native).It's all right guys. It's OK not to know the answer.

you introduce a game but seem reluctant to be more specific on rules. why?

btw what is the starting point to get to a result using an elegant mathematical reasoning?

The closest I could get was (1+4+3*6)++

- katastrofa
**Posts:**8621**Joined:****Location:**Alpha Centauri

I think (14-6)*3 is also an acceptable answer.

- Cuchulainn
**Posts:**60753**Joined:****Location:**Amsterdam-
**Contact:**

ISM is using you as guinea-pigs for a neurotic arithmetic experiment. It's like generating expressions.

http://www.datasimfinancial.com

http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..

R. van Gulik

http://www.datasim.nl

Approach your problem from the right end and begin with the answers. Then one day, perhaps you will find the final question..

R. van Gulik

- katastrofa
**Posts:**8621**Joined:****Location:**Alpha Centauri

Arithmetics is dangerous. Easy to sprain an ankle when doing all the jumps.

GZIP: On