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
Maria handed out 125 flyers that gave students the time and locationtry outs for the school volleyball team. What is 125 written
Temka [501]
One way  is to factor and see which ones repeat

125=5*5*5
it is 5 times itself 3 times
5^3


4 0
3 years ago
Read 2 more answers
9 ft./s into miles per hour
nexus9112 [7]
First multiply 9 by 60 to find feet/minute: 9x60=540. Multiply that answer by 60 to get feet/hour: 540x60=32400. Divide that by 5,280 to get miles/hour: 32400/5280=6.14 roughly :)
4 0
3 years ago
1.<br> 4 sides equal sides and 4 right angles:<br> 4 sides equal sides and 4 right angles
larisa86 [58]

Answer:

a square

Step-by-step explanation:

8 0
3 years ago
2. The number of students in a classroom is 6 more than 4 times the number of teachers. There are 15 teachers. How many students
Alexus [3.1K]
The number of students in a classroom is 66
8 0
3 years ago
What is the value of the discriminant for x2 + 5x = -7?​
Verdich [7]

Answer:

x = -1

Step-by-step explanation:

2x + 5x = -7

7x = -7

x = -1

3 0
2 years ago
Other questions:
  • HELPPPPPPPPPP PLZZZZZZZZZZZZ
    5·1 answer
  • Select all of the answers below that are equivalent to T = {Tinkey-Winky, Laa-Laa,
    15·1 answer
  • If a and b are positive integers and their product is 3 times their sum,what is the value of 1 a + 1 b ?
    13·1 answer
  • How do i write 2 1/5 as a fraction
    14·2 answers
  • Please help me ASAP!!!
    14·1 answer
  • Bess and Carolina and their 14 classmates write their names on cards. The teacher, Miss Scott, picks two cards without replacing
    8·1 answer
  • Help asapppp!!!!! Thankssss
    9·1 answer
  • Jill sold half of her comic books and then bought sixteen more. she now has 36. how many did she begin with?
    6·1 answer
  • Help<br> pleasee<br><br><br><br><br><br><br> ...............
    14·1 answer
  • Rate to unit rate, what is the unit rate of a case of 24 bottles of water for $4.99 ?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!