Skip to content

Simple C program that provides examples of basic C concepts such as basic I/O, conditionals, loops, and functions;

License

Notifications You must be signed in to change notification settings

cmosull/Delta-Algorithm-For-Lottery-Sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Delta-Algorithm-For-Lottery-Sim

Basic Description

This program uses the "Delta Algorithim" to simulate a lottery. The user inputs six numbers as instructed and the program creates six lottery numbers which are then compared to winning numbers. These winning numbers are randomly generated each time and the game is played 1 million times. The numbers of every 10000th generated set of numbers is displayed to the screen. This program is intended to be run from the command line.

This program is in no way efficient or perfect in any sense. This program is intended for those beginning to learn C and want to see basic C concepts demonstrated. The code is commented for better readability.

Tools and Further Comments

The program uses the following libraries:

*stdio.h

*stdlib.h

*time.h

The program was compiled using gcc version 7.4.0 on Ubuntu 18.04.1. I provided a exectuable in this repository but feel free to make your own. This program is free for anyone to take, modify, and use for any reason. Feel free to take this file and edit it to make it a better example for those beginning in C. I wrote this as a class project so I was still learning C at the time. I tried to make comments that clearly explain what each part of the program is doing. Feel free to change those as well!

About

Simple C program that provides examples of basic C concepts such as basic I/O, conditionals, loops, and functions;

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages