Find Jobs
Hire Freelancers

Arrays and Strings

$20-25 USD

Concluído
Publicado há aproximadamente 21 anos

$20-25 USD

Pago na 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 do Projeto: 2923402

Sobre o projeto

17 propostas
Projeto remoto
Ativo há 21 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
See private message.
$7 USD em 14 dias
5,0 (35 avaliações)
4,6
4,6
17 freelancers estão ofertando em média $11 USD for esse trabalho
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
4,9 (48 avaliações)
5,4
5,4
Avatar do Usuário
See private message.
$17 USD em 14 dias
5,0 (53 avaliações)
5,1
5,1
Avatar do Usuário
See private message.
$14,45 USD em 14 dias
4,9 (79 avaliações)
4,7
4,7
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
5,0 (37 avaliações)
3,0
3,0
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
5,0 (4 avaliações)
2,7
2,7
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
4,8 (17 avaliações)
2,7
2,7
Avatar do Usuário
See private message.
$4,25 USD em 14 dias
4,5 (15 avaliações)
2,7
2,7
Avatar do Usuário
See private message.
$15,30 USD em 14 dias
4,9 (10 avaliações)
2,5
2,5
Avatar do Usuário
See private message.
$12,75 USD em 14 dias
4,7 (2 avaliações)
1,3
1,3
Avatar do Usuário
See private message.
$8,50 USD em 14 dias
5,0 (6 avaliações)
1,2
1,2
Avatar do Usuário
See private message.
$4,25 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$17 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$12,75 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$16,15 USD em 14 dias
0,0 (1 avaliação)
0,0
0,0
Avatar do Usuário
See private message.
$21,25 USD em 14 dias
0,0 (2 avaliações)
0,0
0,0
Avatar do Usuário
See private message.
$4,25 USD em 14 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) UNITED STATES
United States
5,0
2
Membro desde mai. 6, 2003

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos 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)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.