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
Nookie1986 [14]
3 years ago
7

A twin primes is a pair of prime numbers such that the difference between them is 2. For example, 5 and 7 are twin primes, and 1

7 and 19 is another pair of twin primes. Write a program that finds all the twin primes between 10 and 500, save the results in a two-column matrix, and output result nicely formatted. You can use the built-in function, isprime().
Mathematics
1 answer:
Nikitich [7]3 years ago
7 0

Answer:         There is 22 possible combinations.

Step-by-step explanation:

%a is equal or greater then 11 and it is odd

count=0;

P=[];

for a=11:2:499

   b=a+2;

   %assume a and b are prime;

   prime=1;

   %check if a and b are prime

   for k=2:ceil(sqrt(b))

       %if a OR b is divisible by k, break

       %it is not prime

       if mod(a, k)==0 | mod(b, k)==0

           prime=0;

           break;

       end

   end

   if prime

       count=count+1;

       P(count, :)=[a b];

   end

end

fprintf('There is %d possible combinations.\n', count)

display(P)

There is 22 possible combinations.

P =

   11    13

   17    19

   29    31

   41    43

   59    61

   71    73

  101   103

  107   109

  137   139

  149   151

  179   181

  191   193

  197   199

  227   229

  239   241

  269   271

  281   283

  311   313

  347   349

  419   421

  431   433

  461   463

You might be interested in
6. trapezoid ABCD shown below, AB|| DC, overline BC perp overline DC and sides have lengths as shown (aDetermine the measure of
laila [671]

Answer:

a). ∠D = 56°

b). AD = √13

Step-by-step explanation:

(a) From the figure attached, ABCD is a trapezoid with parallel sides AB and CD. We have to find the measure of ∠D from the given figure.

From triangle ADE,

tanD=\frac{AE}{DE}

         =\frac{3}{2}

D = tan^{-1}(1.5)

D = 56.31

D ≈ 56°

Therefore, measure of ∠D is 56°.

(b). Now by applying Pythagoras theorem in ΔADE,

AD² = AE² + DE²

       = 3² + 2²

AD² = 9 + 4

AD = √13

Length of AD is √13 in.

7 0
3 years ago
I'LL GIVE BRAINLIEST PLEASE ANSWER ALL FOUR PLEASE
lesya [120]

Answer:

Step-by-step explanation:

1.) 700*0.42 = 294. Out of the 700 people at the concert, 294 are tennagers.

2.) 1.07*$450 = $481.50, including sales tax (final price)

3.) 120/(100%-85%) = 120/0.15 = 800. Original amount of water is 800 ml (Check by 800mL*0.15, which equals 120 mL)

4.) 100-35-45 = 20%

250*20% = 50; Out of the 250 sandwiches, Josh made 50 ham sandwiches.

7 0
2 years ago
<img src="https://tex.z-dn.net/?f=200%2B200%2B200" id="TexFormula1" title="200+200+200" alt="200+200+200" align="absmiddle" clas
MissTica

Answer:

<h2>600</h2>

Step-by-step explanation:

<h3>HOPE IT HELPS!!!!!!</h3>
6 0
2 years ago
Read 2 more answers
The kingston review (kr) is testing a new gmat question. the kr wants to determine what proportion of test-takers will answer th
oksian1 [2.3K]
[67.9 %, 82.1 %] is the 95% confidence interval for the proportion of test-takers answering the question correctly. So we have [67.9 %, 82.1 %] In a random sample of 144 test-takers with 75% answered the question correctly. So the answer in this question is [67.9 %, 82.1 %].
7 0
3 years ago
-5 +8 + (9) =<br> What is the answer for the following equestion
AlexFokin [52]

Answer:

12

Step-by-step explanation:

So we use PEMDAS:

-5 + 8 = 3

3 + 9 = 12

4 0
3 years ago
Read 2 more answers
Other questions:
  • Circle P has center P(2,0) and a radius 20. Circle Q has center Q(0,4) and radius 2. Describe the rule for translating center Q
    7·1 answer
  • What is the place value of 6 in the number 6,029?​
    10·2 answers
  • I really need help, please
    15·2 answers
  • How could the distance formula and slope be used to classify triangles and quadrilaterals in the coordinate plane?
    7·1 answer
  • Rick has 76.8 feet of cable she planas to Cable It into 7 pieces how long is each piece
    15·1 answer
  • 1. Carlos wants to deposit $900 into savings accounts at three different
    5·1 answer
  • Will give brainliest
    13·2 answers
  • What is a similarity statement, and how do you write one?​
    12·2 answers
  • Triangle DNO has vertices at D(5, 8), N(– 3, 10), and O(– 3, 6). If vertex D is translated 4 units to the right, the best name f
    11·1 answer
  • 3. Maria signed up for a lawn service. She was
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!