Simple “hello world”-style template programs. These will get you started writing programs in various languages.
Inspired by Rosetta Code
See also Rosetta Code for hello world web server
A Partial List of Interesting Languages
A List of Languages:
- c++ with boost (?)
List of Programs
List of Programs Implemented for All Languages
- Your basic hello world program, prints something and exits.
What time is it:
- Prints the date as YYYY-MM-DD
- Prints the time as HH:MM:SS
- Shows how to get dates and times in the language, and format them for a standard output.
- Prints the lyrics to “99 Bottles of Beer on the Wall”
- Shows looping in the language.
- Implements the factorial function:
4! = 4*3*2*1
- Uses iterative and recursive versions
- Implements accessing an HTTP resource using get
- Implements running an http server
Calculus: Simpson’s Rule for Integration
- Implements composite Simpson’s Rule to integrate a function over an interval
n approximating points
- Solve the N queens problem using integer arrays, with minimal object-oriented fluff.
Programs In Progress
- Access an API using POST request
Algebra: Log and Trig Tables
- Print out logarithm and trigonometric tables
- Exercises trigonometric functions, formatted print functionality, loops
Calculus: Taylor Series Approximation of Sine Function
- Implements a Taylor Series to approximate a sine function
Calculus: Newton’s Method
- Implements Newton’s Method to compute the roots of an arbitrary function f(x)
Programs To Implement
- Use a native built-in data type to store a 1D array of data
- Gauss-Jordan elimination or back-substitution algorithm
Time a function:
- Compute the numerical derivative of a function
- Compute the numerical integral of a function
- Integrate a differential equation