Given a text file of many lines, where fields within a line are delineated by a single 'dollar' character, write a program that aligns each column of
Continue ReadingC++: Increment a Numerical String
This task is about incrementing a numerical string. // standard C++ string stream operators #include <cstdlib> #include <string> #in
Continue ReadingC++: IBAN
The International Bank Account Number (IBAN) is an internationally agreed means of identifying bank accounts across national borders with a reduced ri
Continue ReadingC++: Evolutionary Algorithm
Starting with: The target string: "METHINKS IT IS LIKE A WEASEL". An array of random characters chosen from the set of upper-case letters toge
Continue ReadingC++: Greatest Subsequential Sum
Given a sequence of integers, find a continuous subsequence which maximizes the sum of its elements, that is, the elements of no other single subseque
Continue ReadingC++: Deal Cards for FreeCell
Free Cell is the solitaire card game that Paul Alfille introduced to the PLATO system in 1978. Jim Horne, at Microsoft, changed the name to FreeCell a
Continue ReadingC++: Deranged Anagrams
Two or more words are said to be anagrams if they have the same characters, but in a different order. By analogy with derangements we define a derange
Continue ReadingC++: Multiplication Tables
Produce a formatted 12×12 multiplication table of the kind memorised by rote when in primary school. Only print the top half triangle of products.
Continue ReadingC++: Fibonacci Word
The Fibonacci Word may be created in a manner analogous to the Fibonacci Sequence as described here: Define F_Word1 as 1; Define F_Word2 as 0;
Continue ReadingC++: Man Or Boy Test
Background: The man or boy test was proposed by computer scientist Donald Knuth as a means of evaluating implementations of the ALGOL 60 programming
Continue Reading