Added program. Tutorial credit goes to zetcode.com.