Homework 6
Due Date: Dec 11, 2014
This assignment is to for you to solve a contest-level problem
from the UVa Online Judge.
The problem is named "The Stern-Brocot Number System"
and is available from
here (pdf).
Write your program in python, Java, or C++.
The following points are worth mentioning.
-
Your program reads from standard input and writes to standard output.
In terms of programming in Java, this means you should use the
Scanner class.
You can use an IDE like eclipse to develop your program.
Doing so allows you to utilize the IDE's editor, source-code highlighting,
and debugging facility.
But you should run your program from the command line.
Do not make your program read from or write to a file,
or hardcoding test data in the program.
-
Make sure your program's output is exactly as described in the
problem statement.
When testing, you should make up your own input for which you know
the correct output.
-
You can work on this assignment as a team of at most 2 people.
Each team should submit only one program with the statement
"Each of us contributed equally," with both members signing.
Submit your program source code and a README
file
by emailing them to me.