1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
azamat
3 years ago
9

I'm doing a task which involves magic v's, a maths pattern which has the rule of having the same total on each side. For e.g.

Mathematics
1 answer:
iogann1982 [59]3 years ago
6 0

Answer:

--1-- (of set 23456)

2   4

5 3

 6

--2-- (of set 23456)

2   3

5 4

 6

--3-- (of set 23456)

2   5

6 3

 4

--4-- (of set 23456)

2   3

6 5

 4

--5-- (of set 23456)

3   5

4 2

 6

--6-- (of set 23456)

3   2

4 5

 6

--7-- (of set 23456)

3   6

5 2

 4

--8-- (of set 23456)

3   2

5 6

 4

--9-- (of set 23456)

3   5

6 4

 2

--10-- (of set 23456)

3   4

6 5

 2

--11-- (of set 23456)

4   5

3 2

 6

--12-- (of set 23456)

4   2

3 5

 6

--13-- (of set 23456)

4   6

5 3

 2

--14-- (of set 23456)

4   3

5 6

 2

--15-- (of set 23456)

5   4

2 3

 6

--16-- (of set 23456)

5   3

2 4

 6

--17-- (of set 23456)

5   6

3 2

 4

--18-- (of set 23456)

5   2

3 6

 4

--19-- (of set 23456)

5   6

4 3

 2

--20-- (of set 23456)

5   3

4 6

 2

--21-- (of set 23456)

6   5

2 3

 4

--22-- (of set 23456)

6   3

2 5

 4

--23-- (of set 23456)

6   5

3 4

 2

--24-- (of set 23456)

6   4

3 5

 2

--1-- (of set 34567)

3   5

6 4

 7

--2-- (of set 34567)

3   4

6 5

 7

--3-- (of set 34567)

3   6

7 4

 5

--4-- (of set 34567)

3   4

7 6

 5

--5-- (of set 34567)

4   6

5 3

 7

--6-- (of set 34567)

4   3

5 6

 7

--7-- (of set 34567)

4   7

6 3

 5

--8-- (of set 34567)

4   3

6 7

 5

--9-- (of set 34567)

4   6

7 5

 3

--10-- (of set 34567)

4   5

7 6

 3

--11-- (of set 34567)

5   6

4 3

 7

--12-- (of set 34567)

5   3

4 6

 7

--13-- (of set 34567)

5   7

6 4

 3

--14-- (of set 34567)

5   4

6 7

 3

--15-- (of set 34567)

6   5

3 4

 7

--16-- (of set 34567)

6   4

3 5

 7

--17-- (of set 34567)

6   7

4 3

 5

--18-- (of set 34567)

6   3

4 7

 5

--19-- (of set 34567)

6   7

5 4

 3

--20-- (of set 34567)

6   4

5 7

 3

--21-- (of set 34567)

7   6

3 4

 5

--22-- (of set 34567)

7   4

3 6

 5

--23-- (of set 34567)

7   6

4 5

 3

--24-- (of set 34567)

7   5

4 6

 3

Step-by-step explanation:

This javascript code is extremely brute-force, but it does the job:

function checkIfInSet(i, set) {

   return i.toString().split('').sort().join('') === set;

}

function checkIfMagic(s) {

   return (parseInt(s[0]) + parseInt(s[1]) == parseInt(s[3]) + parseInt(s[4]))

}

function printMagic(s) {

   console.log(`${s[0]}   ${s[4]}`);

   console.log(` ${s[1]} ${s[3]}`);

   console.log(`  ${s[2]}\n`);

}

function checkSet(set) {

   let counter = 1;

   for(let i=1; i<99999; i++) {

       if (checkIfInSet(i, set) && checkIfMagic(i.toString())) {

           console.log(`--${counter++}-- (of set ${set})`);

           printMagic(i.toString());

       }

   }

}

checkSet('23456');

checkSet('34567');

You might be interested in
Solve the following system of equations:
PSYCHO15rus [73]
If we multiply the first equation by 2 we get
2x - 4y = 12
but the second equation is
2x - 4y = 10

2x - 4y can't have 2 different values  so the are no solutions 
7 0
3 years ago
Read 2 more answers
Which of the following is not an example of like terms?
Viktor [21]

Answer:

A. 2 and-6

Step-by-step explanation:

Like terms are terms that contain the same variables raised to the same powers. In other words, they have the same variables with the same exponents.

So in option A, we have the terms 2 and -6. These terms are not like terms because they do not have the same variables.

4 0
2 years ago
Read 2 more answers
What is the variable in the expression below?<br><br><br> 9.X
Ludmilka [50]

Answer:

The variable in that expression is x

5 0
3 years ago
Read 2 more answers
Mr. Ramirez orders drumsticks and sheet music for a group of students. One pair of drumsticks costs $1. 50, and the sheet music
diamong [38]

Answer:

Step-by-step explanation:

It expresses how much money he had to pay in total for the sheet music and drumsticks altogether.

Have an amazing day!

Please mark brainliest!

8 0
2 years ago
What is the value of p?
kenny6666 [7]

Answer:

35

Step-by-step explanation:

All angles of a triangle add up to 180 degrees, so you can add the other two angles, then subtract by 180.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Six times the sum of a number x and 4.
    14·1 answer
  • Select the correct equations in the image.
    7·1 answer
  • Which expression is the exponential form of
    11·1 answer
  • What are the values of x and y
    14·1 answer
  • Find the exact area of the surface obtained by rotating the curve about the x-axis.
    7·1 answer
  • If g(x) = (24 – x)2 + 7, what is<br> the value of g(6)?<br> O 250<br> O-2<br> O 243<br> O 331
    11·1 answer
  • (PLEASE HELP ME ASAP!!)
    9·1 answer
  • Pls answer all 3
    11·1 answer
  • (-8, -3) and (-3, 4)<br> What’s the slope?
    7·2 answers
  • X + 7 &lt; 12<br><br><br><br><br><br><br><br> please help,
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!