A language has first-class functions if it can do each of the following without recursively invoking a compiler or interpreter or otherwise metaprogra
Continue ReadingC++: Fractran
FRACTRAN is a Turing-complete esoteric programming language invented by the mathematician John Horton Conway. A FRACTRAN program is an ordered list
Continue ReadingC++: Hash From Two Arrays
Using two Arrays of equal length, create a Hash object where the elements from one array (the keys) are linked to the elements of the other (the value
Continue ReadingC++: Here Document
A here document (or "heredoc") is a way of specifying a text block, preserving the line breaks, indentation and other whitespace within the text. D
Continue ReadingC++: Image Noise
Generate a random black and white 320x240 image continuously, showing FPS (frames per second). Sample image: #include <windows.h> #
Continue ReadingC++: Middle Three Digits
The task is to: “Write a function/procedure/subroutine that is called with an integer value and returns the middle three digits of the integer
Continue ReadingC++: Mutex
A mutex (abbreviated Mutually Exclusive access) is a synchronization object, a variant of semaphore with k=1. A mutex is said to be seized by a task d
Continue ReadingC++: Find the Last Sunday of Each Month
Write a program or a script that returns the last Sundays of each month of a given year. The year may be given through any simple input method in your
Continue ReadingC++: 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 ReadingC++: Normal CDF
const double Pi = 3.14159265359; // Standard Normal cumulative distribution function double Normal_CDF(const double & x) { double k = 1
Continue Reading




