Coder Social home page Coder Social logo

stozo04 / texastwostep Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2 KB

This console application simulates a lottery game to determine how many drawings it would take for specific numbers to win the jackpot. The lottery game consists of choosing four unique numbers from 1 to 35 and one bonus ball number from 1 to 35. The application continues to simulate drawings until the selected numbers hit the jackpot.

C# 100.00%

texastwostep's Introduction

Lottery Simulation Console Application

Overview

This console application simulates a lottery game to determine how many drawings it would take for specific numbers to win the jackpot. The lottery game consists of choosing four unique numbers from 1 to 35 and one bonus ball number from 1 to 35. The application continues to simulate drawings until the selected numbers hit the jackpot.

Features

  • Simulates lottery drawings with four unique numbers and one bonus ball number.
  • Tracks the total cost and total winnings over time.
  • Outputs the results after every 100,000 drawings for progress tracking.
  • Continues simulation until the selected numbers win the jackpot.

How to Use

  1. Open the project in your preferred C# development environment.
  2. Ensure your selected numbers and bonus ball number are correctly set in the MyNumbers and MyBonusBall variables.
  3. Run the application.
  4. The application will output the progress after every 100,000 drawings and will notify you once it hits the jackpot, displaying the total cost and total winnings.

Selected Numbers

  • Regular Numbers: 5, 13, 22, 33
  • Bonus Ball: 27

Output

The application will output the following information:

  • The number of drawings after every 100,000 simulations.
  • The total cost and total winnings after every 100,000 simulations.
  • Notification of hitting the jackpot, along with the total cost and total winnings at that point.

Example Output

After 100,000 drawings, Total Cost: $100,000, Total Won: $29,202 ... Hit the Jackpot after 1,235,955 drawings! Total Cost: $1,235,955, Total Won: $856,176

Note

This is a basic simulation and does not account for various real-world factors such as taxes, interest, inflation, or changes in lottery rules. It is intended for entertainment and educational purposes only.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.