This code is based on Andy Sloane's donut.c tutorial, and has been modified for better comprehension.
In any shell, compile donut.ccp
with
g++ donut.cpp -o donut
and execute the compiled file with
./donut
The current version of the code produces the below result