// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <iostream>
#include <cstdlib>

using namespace std;

double f(double x)
{
    return x*x;
}

int main()
{
    for(int i = 20; i >= 0; i--)
    {
        for(int j = -5; j < 5; j++)
        {
            double x = j;
            double y = f(x);
            if(int(y) == i)
            {
                cout << "*";
            }
            else
            {
                cout << " ";
            }
        }
        cout << endl;
    }
    return EXIT_SUCCESS;
}
