views:

45

answers:

3

I'm currently creating an experimental programming language for fun and educational purpose and in search for some tasks beyond the classical "Hello, World!"-program.

I've already come up with these ideas:

  • Print out the program's input
  • Calculator
  • Generate Prime numbers, Fibonacci series

What other interesting programming problems do you have for me to test?

It would be good if they required the language to solve a broad spectrum of task, take prime numbers for example: You need variables, increment them, divide them, perform actions under certain conditions, etc.

+2  A: 

The first thing that springs to mind: place 8 queens on a chess board so that none of them attack each other. Heap- or merge sort might also be interesting examples.

Tomislav Nakic-Alfirevic
That would probably require a very long solution compared to my examples above
sub
+3  A: 

How about a program that takes a dollar amount, such as $27.32, and spits out the minimum set of bills and coins needed to produce it? Lots of looping, some formatting, and an opportunity for a table-driven approach.

Sample output (for the above value):

0 $100 
0 $50
1 $20
0 $10
1 $5
2 $1
0 $0.50
1 $0.25
0 $0.10
1 $0.05
2 $0.01
Steven Sudit
+2  A: 

Find the decimal value of pi or e to an arbitrary precision.

martin jakubik