- In mastermind there are six colours and four pegs.
Using 0-5 for the colours, write a program that prints out all
possible combinations of the colours.
- Generalise this to
colours and
pegs.
The
and
should be passed to the program as command line arguments.
- Write a program that stores four random integers between 0 and 5 in
an array and print out the array.
- Write a program that stores
random integers between 0 and
in
an array and prints out the array.
s.danicic@gold.ac.uk
Sebastian Danicic BSc MSc PhD (Reader in Computer Science)
Dept of Computing, Goldsmiths, University of London, London SE14 6NW
Last updated 2015-09-04