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
Last week Martha sold brownies. And cookies at a back sale she sold 60 bowlines and 42 cookies on Saturday and 28 brownies and 5
elena55 [62]

Answer:

Martha earns $65.6 over the weekend.

Step-by-step explanation:

Brownies sold by Martha on Saturday = 60

Cookies  sold by Martha on Saturday = 42

Brownies sold by Martha on Sunday = 28

Cookies  sold by Martha on Sunday = 54

Total brownies sold by Martha over the weekend = 60+28=88

Total cookies sold by Martha over the weekend = 42+54=96

Cost of a brownie = $0.20

Cost of a cookie = $0.50

Total cost of brownies sold over the weekend = 88\times \$0.20 = \$17.6

Total cost of cookies sold over the weekend = 96\times \$0.50 = \$48

∴ Total money Martha earned over the weekend = \$17.6+\$48=\$65.6 (Answer)

4 0
3 years ago
1 cup = ______ fluid ounces <br><br> = 8
Brut [27]

Answer:

8

Step-by-step explanation:

5 0
3 years ago
Jose is a botanist studying production of coconuts by two different groups of his
Colt1911 [192]

Answer: 132

Step-by-step explanation:

Since we are informed that Group 1 of trees produced 25 percent more coconuts than Group 2 did and that Group 1 produced 165 coconuts, the number of coconuts that Group 2 produce will be:

= [100 / (100 + 25)] × 165

= 100/125 × 165

= 0.8 × 165

= 132

Group 2 produced 132 coconuts.

5 0
3 years ago
Can someone please help me! Big ideas 8.4 number 16
8_murik_8 [283]
<h3>Answer:   24.5 </h3>

============================================================

Explanation:

It might help to draw it out. See the diagram below.

The base is JK which is 7 units long. I'm picking this as the base because this segment is completely horizontal.

Notice how the base JK spans from x = -3 to x = 4, which we can use subtraction and absolute value to get |J-K| = |-3-4| = 7.

The height is always perpendicular to the base. If the base is JK = 7, then the height is the vertical distance from K (or J) to L. This vertical distance is also 7 units. Subtract the y coordinates and apply absolute value. The base and height aren't always the same number.

Now we can find the area of the triangle

area = base*height/2

area = 7*7/2

area = 49/2

area = 24.5 square units

3 0
3 years ago
The number 6 is in both the domain and the range of the function A(n)
Mazyrski [523]

Answer:

doing dis for points so i dont kno

Step-by-step explanation:

im soooo sorry

8 0
3 years ago
Other questions:
  • PLEASE SOLVE IT OUT FOR ME !!!!! PLEASE
    15·1 answer
  • Find the equation of the line shown.
    15·1 answer
  • Problem Page
    10·1 answer
  • For each of the following sequences, determine whether it converges in probability to a constant. If it does, enter the value of
    13·1 answer
  • Y’all I need help on #9
    6·1 answer
  • What is slope 1 and 2? ​
    13·2 answers
  • In isosceles triangle RST below, what is the value of y?
    10·2 answers
  • Four of the angle of a Pentagon are 70°,90°,100° and 145°. What is the side of a fifth angle?​
    11·1 answer
  • Why is there no tutor​
    8·2 answers
  • If (2) - 2x - 6, which of these is the inverse of x)?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!