Simple "hello world"-style template programs. These will get you started writing programs in various languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Charles Reid be29e8e2b0 adding working N queens problem solution in C++ 4 years ago
awk updating http.awk to be http_get.awk 4 years ago
bash updating bash http GET script and factorial. corresponding updates to readme. 4 years ago
c moving C http get from http to http_get 4 years ago
cpp adding working N queens problem solution in C++ 4 years ago
fortran updating 99 bottles and hello world in fortran, and adding readme. 4 years ago
go rename Go simpsons rule program 4 years ago
haskell adding factorial functions. 5 years ago
java removing superfluous files. new dir structure takes care of this. 4 years ago
kotlin adding kotlin 4 years ago
lisp embellishing readmes 4 years ago
octave adding factorial functions. 5 years ago
perl adding N queens problem in perl and profiling/timing scripts 4 years ago
php adding PHP factorial function, and updating PHP readme 4 years ago
python removing superfluous files. new dir structure takes care of this. 4 years ago
ruby Making Ruby hello world into hello function 4 years ago
rust removing executable 4 years ago
.gitignore removing superfluous files. new dir structure takes care of this. 4 years ago
README.md add n queens to readme. 4 years ago

README.md

hello-world

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
  • c++
  • c++ with boost (?)
  • java
  • octave
  • python
  • awk
  • bash
  • fortran
  • go
  • haskell
  • lisp
  • perl
  • php
  • ruby

List of Programs

List of Programs Implemented for All Languages

Hello World:

  • 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.

99 Bottles:

  • Prints the lyrics to “99 Bottles of Beer on the Wall”
  • Shows looping in the language.

Factorial:

  • Implements the factorial function: 4! = 4*3*2*1
  • Uses iterative and recursive versions

HTTP Get:

  • Implements accessing an HTTP resource using get
  • Link

HTTP Server:

  • Implements running an http server
  • Link

Calculus: Simpson’s Rule for Integration

  • Implements composite Simpson’s Rule to integrate a function over an interval [a,b] using n approximating points

N Queens:

  • Solve the N queens problem using integer arrays, with minimal object-oriented fluff.

Programs In Progress

HTTP Post:

  • 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

Arrays:

  • Use a native built-in data type to store a 1D array of data

Matrix inversion:

  • Gauss-Jordan elimination or back-substitution algorithm

Vector products:

Time a function:

Calculus:

  • Compute the numerical derivative of a function
  • Compute the numerical integral of a function
  • Integrate a differential equation