Hamming numbers are numbers of the form . Hamming numbers are also known as ugly numbers and also 5-smooth numbers (numbers whose prime div

Continue Reading## C++: Rational Number Arithmetic

The objective of this task is to create a reasonably complete implementation of rational arithmetic in the particular language using the idioms of the

Continue Reading## C++: Generate Random Number in Range

int random_in_range(int a, int b) //Function that returns a random integer between 2 provided integers { return a + random() % (b-a+1); }

Continue Reading## C++: Guess the Number With Feedback

The task is to write a game that follows the following rules: The computer will choose a number between given set limits and asks the player for

Continue Reading## C++: Fibonacci N-Step Number Sequences

These number series are an expansion of the ordinary Fibonacci sequence where: For n = 2 we have the Fibonacci sequence; with initial values [1,1

Continue Reading## C++: Linear Congruential Generator

The linear congruential generator is a very simple example of a random number generator. All linear congruential generators use this formula:

Continue Reading## C++: Construct from Rational Number

To understand this task in context please see Continued fraction arithmetic The purpose of this task is to write a function r2cf(int N1,int N2), or

Continue Reading## C++: Guess the Number With Feedback (Vs Player)

The task is to write a player for the game that follows the following rules: The scorer will choose a number between set limits. The computer pla

Continue Reading## C++: Complex Number Arithmetic

A complex number is a number which can be written as "" (sometimes shown as "") where a and b are real numbers and i is the square root of -1. Typical

Continue Reading## C++: Ludic Numbers

Ludic numbers are related to prime numbers as they are generated by a sieve quite like the Sieve of Eratosthenes is used to generate prime numbers.

Continue Reading