CPPForSchool.com: User Defined Function Set 1: Assignment 3

3. Write a function that receives two numbers as an argument and display all prime numbers between these two numbers. Call this function from main( ).


It seems that finding prime numbers is not my forte, yet.  I experienced quite a snag trying to implement the correct algorithm in order to separate prime numbers from the rest of the integers.  On the other hand, I am beginning to gain more confidence in my use of functions being called from outside of int main.  Below is my source code and outputs along with the sample source and output for comparison.













Comments

Popular posts from this blog

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 9

CPPForSchool.com: Array - Single Dimension Set 1 Assignment 6

CPPForSchool.com: Variable, Operator & Expression Set 1: Assignment 8