Find Jobs
Hire Freelancers

A C++ project

$10-30 USD

Concluído
Publicado há aproximadamente 8 anos

$10-30 USD

Pago na entrega
Write a program to simulate a lottery drawing which uses balls that are numbered from 1 to 10. Assume that three balls are drawn at random and the number are unique for each draw. (all 3 numbers must be different). Allow a user to enter the number of lottery drawings to simulate. The program must validate the input. For example, number of drawing can't be negative. The program must not quit in case an input is incorrect. The program must output the following: 1) What percentage of the time does a draw contain three even numbers in the simulation? 2) What percentage of the time does the number 7 occur in the set of three numbers in the simulation? 3) What percentage of the time does the system draw 1, 2, and 3 (in any order) in the simulation? OUTPUT (This format MUST be followed) Enter number of lottery drawings =>10 Draw #1: First: 5 Second: 6 Third: 3 Draw #2: First: 3 Second: 2 Third: 7 Draw #3: First:10 Second: 4 Third: 9 Draw #4: First: 1 Second:10 Third: 5 Draw #5: First: 7 Second: 1 Third: 2 Draw #6: First: 9 Second:10 Third: 6 Draw #7: First: 4 Second: 1 Third: 6 Draw #8: First: 8 Second: 2 Third: 6 Draw #9: First: 1 Second: 5 Third: 8 Draw #10: First: 2 Second: 5 Third: 4 Occurrence of all even:10.00% Occurrence of sevens:20.00% Occurrence of 1-2-3 (any order):0.00% - I just want to be a basic program.
ID do Projeto: 9827744

Sobre o projeto

2 propostas
Projeto remoto
Ativo há 8 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
Hi, I have read the requirements and I would like to do this project if given the opportunity. I am a computer science practitioner and having the "C++ and Algorithms Certification Badge" in my profile gives me confidence and assurance that I can deliver you the project as required. Let me know if you are interested so I can start. Thanks.
$20 USD em 0 dia
5,0 (408 avaliações)
6,6
6,6
2 freelancers estão ofertando em média $25 USD for esse trabalho
Avatar do Usuário
see my c++ work history see my c++ work history see my c++ work history see my c++ work history see my c++ work history see my c++ work history see my c++ work history see my c++ work history
$30 USD em 1 dia
5,0 (14 avaliações)
4,2
4,2

Sobre o cliente

Bandeira do(a) UNITED STATES
PALM BAY, United States
5,0
7
Membro desde jan. 28, 2016

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.