Find Jobs
Hire Freelancers

implement it and make it run C++

$10-30 USD

Terminado
Publicado hace más de 10 años

$10-30 USD

Pagado a la entrega
Hi The homework is to implement the program and make it run up to 200 Here is the homework: Check the attachment for a better picture of the code Problem Solving with Vectors: Example: Sieve of Erastothenes: The basic idea behind the algorithm is to take a list of all the positive integers and strike out those that cannot possible be prime numbers. When those are removed, the remaining values must therefore be prime. Suppose we want to discover the prime numbers less than 20. An index will move through the collection starting at the beginning, that is 2. Starting from this position, which is a prime number, eliminate all multiples of 2. Next we advance the index to the next position that has not been eliminated, namely 3. Again, we eliminate all multiple of three, and so on. void sieve(vector<int> &values) { unsigned int max = [login to view URL](); int i; // first initialize all cells for (i =0; i < max; i++) values[i]= i; //now search for non-zero cells for (i=2; i*i <= max; i++) { if (values[i] !=0) for ( int j =i+i; j < max; j+=i) values[j] =0; } }
ID del proyecto: 5193945

Información sobre el proyecto

3 propuestas
Proyecto remoto
Activo hace 10 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
Hello. I have checked assignment requirements. it looks easy, and it can be done in one hour or two hours.
$11 USD en 1 día
5,0 (499 comentarios)
6,7
6,7
3 freelancers están ofertando un promedio de $14 USD por este trabajo
Avatar del usuario
A proposal has not yet been provided
$20 USD en 1 día
5,0 (1 comentario)
1,1
1,1
Avatar del usuario
hi, i can finished this in less then 30 minutes, you don't worry project will be complete on time. Alex
$10 USD en 0 día
5,0 (1 comentario)
1,0
1,0

Sobre este cliente

Bandera de UNITED STATES
Houston, United States
5,0
3
Forma de pago verificada
Miembro desde oct 31, 2013

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.