I am a student writing a program to compute four numbers {10, 10, 10, 10} with three operators (e.g., "+-/" "++*", etc.) that evaluate to numbers 0-9.
My program evaluates multiple expressions that equal 0-9, except for numbers 4 and 6.
An example is: (10*10)/(10+10) = 100/20 = 5 .
Can someone show me the equation (or tell me how to get to the answer) for numbers 4 and 6? I think if I know the equation, I would know what's wrong with my code. I would much appreciate it.
Edit: My calculation for computing 7 is incorrect.
I wrote a
Pythonscript, with 3 operators and 4 10‘s you can only have:However you can get all digits using 3s.
Solutions using all four numbers
10s
4s