🔒 Closed Paexplain naman sir ng flow mga sir. Thank you

Status
Not open for further replies.

Kiss21

Eternal Poster
Sir pahelp naman po kun ani po uung mga function at flow nito sir. Salamat ng maramu sir. C++ po yan.
 

Attachments

  • 40FAFE15-5521-4D62-A589-7C7D09D8B7DF.webp
    40FAFE15-5521-4D62-A589-7C7D09D8B7DF.webp
    65 KB · Views: 60
Seriously? The comment lines on it are self explanatory.

1st loop initializes the array of bolean variables into the value "true" because at this point most likely they contain garbage values which is important for the next step.

2nd loop is where the Sieve mathematical algorithm happens. Just refer to the link the below for "
The Sieve of Eratosthenes" mathematical formula because that should be another topic entirely.
You do not have permission to view the full content of this post. Log in or register now.

3rd loop is there to count how many prime numbers there are by counting how many elements in the array of boolean "flags" which hold the value "true".

4th loop is just there to display all the prime numbers within the limit.
 
Seriously? The comment lines on it are self explanatory.

1st loop initializes the array of bolean variables into the value "true" because at this point most likely they contain garbage values which is important for the next step.

2nd loop is where the Sieve mathematical algorithm happens. Just refer to the link the below for "
The Sieve of Eratosthenes" mathematical formula because that should be another topic entirely.
You do not have permission to view the full content of this post. Log in or register now.

3rd loop is there to count how many prime numbers there are by counting how many elements in the array of boolean "flags" which hold the value "true".

4th loop is just there to display all the prime numbers within the limit.
Thank you soo much sir. Big help
 
Seriously? The comment lines on it are self explanatory.

1st loop initializes the array of bolean variables into the value "true" because at this point most likely they contain garbage values which is important for the next step.

2nd loop is where the Sieve mathematical algorithm happens. Just refer to the link the below for "
The Sieve of Eratosthenes" mathematical formula because that should be another topic entirely.
You do not have permission to view the full content of this post. Log in or register now.

3rd loop is there to count how many prime numbers there are by counting how many elements in the array of boolean "flags" which hold the value "true".

4th loop is just there to display all the prime numbers within the limit.
sir ano po yung purpose ng flags sir?
 
Status
Not open for further replies.

About this Thread

  • 5
    Replies
  • 476
    Views
  • 4
    Participants
Last reply from:
homer_simpson

Trending Topics

Online now

Members online
1,115
Guests online
1,204
Total visitors
2,319

Forum statistics

Threads
2,288,291
Posts
29,050,386
Members
1,214,997
Latest member
helixxxx65
Back
Top