This is my repository for all of the fun code that I have written in the past. Some are class problems I solved and some are projects that I worked on for personal enjoyment. I have code in Java
and C
. Here is a list of the Java
programs that I have here:
##1. Clock Solver
Have you ever wondered when the clock hands are at an 180 degree angle? How about at a 45 degree angle? This .java
program will solve these pesky questions with ease.
##2. Changemaker
Everyone can agree that pocket change is pretty annoying. Ever want to know what the smallest amount of coins a certain amount of cents are? With the American coin denominations, greed works. Take as many of the largest denomination possible until you can't. Rinse and repeat with the next smallest coin until you have your change. But what about Alien worlds who have coin denominations listed as this: 1
, 3
, 8
, 13
, and17
cent coins? This .java
program will find the smallest amount of change necessary for any combination of denominations.
Here is the list of C
programs that I have:
##1. Piano Notes & Scales
This project is two fold. One .c
file named piano_keys.c
outputs the note frequncies of the keys of an 88-key piano. The second file in the project is named piano_scales.c
. This program outputs the major and minor scale of any note given by the user.
##2. String Compare & Rotate
There are two files in here that exercise string manipulation. stringcompare.c
compares strings at the individual character level and outputs a new string that contains the characters that are "larger" in each position. By larger, I mean whichever character's integer value is larger. The second program rotate.c
takes any string and rotates the string any number of characters in either direction.
##3. UTF-32 to UTF-8 Converter
This program, named utf32toutf8.c
, takes standard input encoded in UTF-32 LE (little endian) and outputs the corresponding UTF-8 to standard output. There is a file named utf32toutf8_test.c
which includes unit tests.