Find Jobs
Hire Freelancers

Arrays and Strings

$20-25 USD

Terminado
Publicado hace alrededor de 21 años

$20-25 USD

Pagado a la entrega
Write a program which reads a list of grade point averages into an array of type double (and size 10). After the program has completed reading, the contents of the array are printed out. Define and use a function which prompts the user for a grade point average (or negative value to end) and reads the value. The function, in a loop: 1. checks that a valid number has been entered (see scan_fraction logic from lab05) 2. if the value is negative (input end signal), return -1 3. check that the number entered is in the range 0 to 4.0. If either check fails, write an error message “invalid gpa, entry ignored?? and repeat the loop. The function has one output argument (gpa) and returns 0 (if a valid gpa has been entered) or ??"1 to signal that reading terminates. Your program (main) will, in a loop, repeatedly call this function for gpa values and, as long as the function returns 0, insert them into the array. The loop terminates: 1. when the function returns ??"1 OR 2. when the array is full The program then prints out the list of gpa values. Test with a list of gpa values less than, equal to, and greater than the capacity of the array. Test the function by supplying a bad gpa (type some letters instead of numbers) and some gpa values outside 0.0 to 4.0. Document this program according to the guidelines. Poorly or non-documented programs will be downgraded. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. Sample Tests Script started on Fri Mar 28 13:55:55 2003 % gpa_array supply gpa between 0.0 and 4.0 (-1 to exit): -1 Grade Point Averages Array pos gpa % gpa_array supply gpa between 0.0 and 4.0 (-1 to exit): aaa invalid gpa - reenter supply gpa between 0.0 and 4.0 (-1 to exit): 5.2 gpa out of range -reenter supply gpa between 0.0 and 4.0 (-1 to exit): 3.2 supply gpa between 0.0 and 4.0 (-1 to exit): 2.1 supply gpa between 0.0 and 4.0 (-1 to exit): -1 Grade Point Averages Array pos gpa 0 3.20 1 2.10 % gpa_array supply gpa between 0.0 and 4.0 (-1 to exit): 0.1 supply gpa between 0.0 and 4.0 (-1 to exit): 1.2 supply gpa between 0.0 and 4.0 (-1 to exit): 2.3 supply gpa between 0.0 and 4.0 (-1 to exit): 3.4 supply gpa between 0.0 and 4.0 (-1 to exit): 4.1 gpa out of range -reenter supply gpa between 0.0 and 4.0 (-1 to exit): 1.2 supply gpa between 0.0 and 4.0 (-1 to exit): 2.4 supply gpa between 0.0 and 4.0 (-1 to exit): 0.1 supply gpa between 0.0 and 4.0 (-1 to exit): 0.0 supply gpa between 0.0 and 4.0 (-1 to exit): 4.0 supply gpa between 0.0 and 4.0 (-1 to exit): 3.9 Array full -data entry terminated Grade Point Averages Array pos gpa 0 0.10 1 1.20 2 2.30 3 3.40 4 1.20 5 2.40 6 0.10 7 0.00 8 4.00 9 3.90 % exit ## Platform Linux or Unix
ID del proyecto: 2923402

Información sobre el proyecto

17 propuestas
Proyecto remoto
Activo hace 21 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
See private message.
$7 USD en 14 días
5,0 (35 comentarios)
4,6
4,6
17 freelancers están ofertando un promedio de $11 USD por este trabajo
Avatar del usuario
See private message.
$8,50 USD en 14 días
4,9 (48 comentarios)
5,4
5,4
Avatar del usuario
See private message.
$17 USD en 14 días
5,0 (53 comentarios)
5,1
5,1
Avatar del usuario
See private message.
$14,45 USD en 14 días
4,9 (79 comentarios)
4,7
4,7
Avatar del usuario
See private message.
$8,50 USD en 14 días
5,0 (37 comentarios)
3,0
3,0
Avatar del usuario
See private message.
$8,50 USD en 14 días
5,0 (4 comentarios)
2,7
2,7
Avatar del usuario
See private message.
$8,50 USD en 14 días
4,8 (17 comentarios)
2,7
2,7
Avatar del usuario
See private message.
$4,25 USD en 14 días
4,5 (15 comentarios)
2,7
2,7
Avatar del usuario
See private message.
$15,30 USD en 14 días
4,9 (10 comentarios)
2,5
2,5
Avatar del usuario
See private message.
$12,75 USD en 14 días
4,7 (2 comentarios)
1,3
1,3
Avatar del usuario
See private message.
$8,50 USD en 14 días
5,0 (6 comentarios)
1,2
1,2
Avatar del usuario
See private message.
$4,25 USD en 14 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$17 USD en 14 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$12,75 USD en 14 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$16,15 USD en 14 días
0,0 (1 comentario)
0,0
0,0
Avatar del usuario
See private message.
$21,25 USD en 14 días
0,0 (2 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$4,25 USD en 14 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
United States
5,0
2
Miembro desde may 6, 2003

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.