Please give me solution in easy way to understand easily.
Note : This program is useful to Basic learners
Problem:
Write a C program that reads an integer n and uses an array to efficiently find out the first n prime numbers
Please give me solution in easy way to understand easily.
Note : This program is useful to Basic learners
Problem:
Write a C program that reads an integer n and uses an array to efficiently find out the first n prime numbers
I have a better idea: You read the Wikipedia article on Sieve of Eratosthenes, and get started on implementing that algorithm, into your program.
Then you post it, when and if you get stuck or have questions - and we will strive to help out.
Because we're not a homework service, and nothing helps your learning more than having you actively engaged in the whole learning process.
And welcome to the forum!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.