Anyone good at C Programming?

jiggy2dmax
10+ year member

CarAudio.com Elite
I can't figure out this flowchart for my life, anyone care to help.

Here's the problem:

Write a flowchart that will print out all the possilbe twin primes between 2 and 10k. Twin primes are prime numbers that differ by 2.

So far I have:

Start

number=2

factor=2

comparison of number%factor

Anyone care to help me figure this out?

 
I can't figure out this flowchart for my life, anyone care to help.
Here's the problem:

Write a flowchart that will print out all the possilbe twin primes between 2 and 10k. Twin primes are prime numbers that differ by 2.

So far I have:

Start

number=2

factor=2

comparison of number%factor

Anyone care to help me figure this out?
Fill an array with all the primes you find first. Then iterate through the array and keep the ones that differ by two. Shouldn't be too hard.

To find the primes, realize that you only need to divide till the square root of a number, and you only need to divide by the primes until that square root. So your program should be pretty quick if you do it like that.

 
Activity
No one is currently typing a reply...

About this thread

jiggy2dmax

10+ year member
CarAudio.com Elite
Thread starter
jiggy2dmax
Joined
Location
NY
Start date
Participants
Who Replied
Replies
1
Views
119
Last reply date
Last reply from
Hundreth
IMG_20260516_193114554_HDR.jpg

sherbanater

    May 16, 2026
  • 0
  • 0
IMG_20260516_192955471_HDR.jpg

sherbanater

    May 16, 2026
  • 0
  • 0

New threads

Top