Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

image

Digits

A cool little C program to count the occerances of every digit from zero to your chosen number. This program was written with speed in mind. On my laptop it will run to 1 million in about 2 seconds. Graphing the results in GNUPlot produces an interesting pattern.

Usage

Complie with: gcc digits.c -o digits

Run with: ./digits <end-number>

Output is saved in a file, and is of the form:

<current number> <zeros in current> <zeros running total> <ones in current> <ones running total> ... <nines in current> <nines running total>

Cool video

A video of the results in an animated GNUPlot: https://youtu.be/xAPqNJ5Vm3Q

About

Count the occerances of every digit from zero to your chosen number. Plot results for cool fractal.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages