Find Jobs
Hire Freelancers

A C++ project

$10-30 USD

Completed
Posted about 8 years ago

$10-30 USD

Paid on delivery
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.
Project ID: 9827744

About the project

2 proposals
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 in 0 day
5.0 (408 reviews)
6.6
6.6
2 freelancers are bidding on average $25 USD for this job
User Avatar
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 in 1 day
5.0 (14 reviews)
4.2
4.2

About the client

Flag of UNITED STATES
PALM BAY, United States
5.0
7
Member since Jan 28, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.