At the input 4 numbers from 1 to 9 (can be repeated). It is necessary to write a program that will determine whether it is possible from the given numbers and arithmetic signs: addition, subtraction, multiplication, division and parentheses, to make a number equal to 24.

Closed due to the fact that the participants are off-topic Sergey Gornostaev , Enikeyschik , Denis , freim , Roman C April 8 at 19:44 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • " Learning tasks are allowed as questions only on the condition that you tried to solve them yourself before asking a question . Please edit the question and indicate what caused you difficulties in solving the problem. For example, give the code you wrote, trying to solve the problem "- Sergey Gornostaev, Enikeyschik, Denis, freim, Roman C
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    Developments in the studio! - Alex Tremasov
  • possible, System.out.println ("3 * 2 * 2 * 2"); - Komdosh 2:19 pm
  • But in the expression itself, they can also be repeated? (i.e. if 7 is one - then is it once and can it be in the expression?) - dSH
  • @dSH digits can be repeated only if they repeat at the input - McCool
  • The task is simple, it works in a loop. Show your achievements, we will try to help with the problem. - Dred

0