Provide code that produces a list of numbers which is the n-th order forward difference, given a non-negative integer (specifying the order) and a list of numbers. The first-order forward […]

Continue Reading## C++: FizzBuzz

Write a program that prints the integers from 1 to 100. But for multiples of three print “Fizz” instead of the number, and for the multiples of five print “Buzz”. […]

Continue Reading## C++: Factors of an Integer

Compute the factors of a positive integer. These factors are the positive integers by which the number being factored can be divided to yield a positive integer result (though the […]

Continue Reading## C++: Integer Literals

Some programming languages have ways of expressing integer literals in bases other than the normal base ten. Show how integer literals can be expressed in as many bases as your […]

Continue Reading## C++: Hickerson Series of Almost Integers

The following function, due to D Hickerson, is said to generate “Almost integers” by the “Almost Integer” page of Wolfram Mathworld. (December 31 2013). The function is: It is said […]

Continue Reading