This programming task, is to calculate ANY binomial coefficient. However, it has to be able to output , which is 10. This formula is recommended
Continue ReadingC++: Catch an Exception Thrown in a Nested Call
Show how to create a user-defined exception and show how to catch an exception raised from several nested calls away. Create two user-defined exc
Continue ReadingC++: Copy and Swap
The copy-and-swap idiom identifies that we can implement a classes copy/move assignment operators in terms of its copy/move constructor and achieve st
Continue ReadingC++: Arena Storage Pool
Dynamically allocated objects take their memory from a heap. The memory for an object is provided by an allocator which maintains the storage pool use
Continue ReadingC++: While Loops
Start an integer value at 1024. Loop while it is greater than 0. Print the value (with a newline) and divide it by two each time through the loop.
Continue ReadingC++: Magic Squares of Odd Order
A magic square is an square matrix whose numbers (usually integers) consist of consecutive numbers arranged so that the sum of each row and column, a
Continue ReadingC++: Loop Breaks
Show a loop which prints random numbers (each number newly generated each loop) from 0 to 19 (inclusive). If a number is 10, stop the loop after print
Continue ReadingC++: Black Scholes Call Option Theta
// Calculate the Black Scholes European call option Theta double BS_Call_Option_Theta(double S, double K, double r, double v, double T) // Para
Continue ReadingC++: Pascal’s Triangle
The task is to print out the first 15 Catalan numbers by extracting them from Pascal's triangle. This enables calculation of Catalan Numbers using onl
Continue ReadingC++: Forest Fire
Implement the Drossel and Schwabl definition of the forest-fire model. It is basically a 2D cellular automaton where each cell can be in three dist
Continue Reading




