Code Snippet - Smallest Number Divisible by 1-20

Code Snippet - Smallest Number Divisible by 1-20

This algorithm will calculate the lowest number that is evenly divisible by all of the numbers from 1-20. This is one of the Project Euler problems (, which i have recently taken to playing with. I really enjoy thinking in a completely different way to my day job, and this is a great place to do that. Check it out below.

The code uses a do-while loop to increase the number to be tested from 1 to as high as is needed to allow the number to be divisable by 20 and all numbers below.

Code Snippet - Printing a Binary Triangle

This little code snippet comes directly from a 'code challenge' I completed on and I found it really interesting so decided to put it up here.

The challenge was to create a binary triangle of a size determined by the user. So the program collected user input for the number of rows and then printed a binary triangle to the console output in the format given in the challenge spec below. The method shown here does not include gathering the user input.

Foreign Exchange Calculator Background

The idea for this project has grown from an interest in trading on the forex market. My particular interest is that of spreadbetting on the market movements caused by news announcements. This involves settings orders to buy or sell opposing currencies depending on the way that the news announcements move the market, and how far they move the market.