Home
Random
Log in
Settings
About Rosetta Code
Disclaimers
Rosetta Code
Search
Template:Task: Difference between revisions
Template
Discussion
← Older edit
Newer edit →
Template:Task
(view source)
Revision as of 05:58, 26 July 2020
369 bytes removed
,
3 years ago
Blanked the page
Revision as of 05:57, 26 July 2020
(
view source
)
rosettacode>JusC
No edit summary
← Older edit
Revision as of 05:58, 26 July 2020
(
view source
)
rosettacode>JusC
(Blanked the page)
Newer edit →
Line 1:
{{task}}
Twin primes are pairs of natural numbers(P1 and P2) that satisfy the following:
# P1 and P2 are primes
# P1 + 2 = P2
Write a program that displays the number of twin primes that can be found under a user-inputted number.
Examples below:
{{out}}
<pre>
> Search Size: 100
> 8 twin prime pairs.
</pre>
<pre>
> Search Size: 1000
> 35 twin prime pairs.
</pre>
Anonymous user
rosettacode>JusC