AP Computer Science Rules
Credit: You get up to 10 extra credit points depending on how well your code works,
how well it is commented, how elegantly it is written, etc. Include a comment at the
top, as usual, describing how the program went for you and how long it took. If you
wrote pseudocode or did any scratchwork on paper, hand that in too. E-mail me your
code and give me paper copies of any pseudocode or scratchwork.
Input: Valid input includes two formats.
Numbers without repeating decimals. For example,
Output: Output is the reduced fraction form of the input, written as a fraction.
Numbers with repeating decimals. For example,
0. means 0.33333333333...
9.123 means 9.12345454545...
.119 means 0.119984984984...
Handling Exceptions: Your program should catch any invalid user input, print an
appropriate error message, and ask the user to re-enter. Invalid input is anything
other than what is shown above for valid input.
- If your program uses numeric primatives, use variables of type long.
- Your program should explain to users how to use the program.