in reply to Hints on hoq to create this graph?

For visually controlling output, have a look at printf

Replies are listed 'Best First'.
Re^2: Hints on hoq to create this graph?
by Ratazong (Monsignor) on Feb 13, 2014 at 16:23 UTC

    Asking Google for ASCII-art will probably bring you an even nicer solution ... but this one will give you the idea...

    print " *****\n". " * *\n". " * O *\n". " * O *\n". " * *\n". " *****\n";

    Rata (assuming the OP has some hidden requirements not posted ... )

    update: Based on the commands available to you, you teacher probably expects you to use an array (of the size (2n+1)(2n+1)), with (n)(n) being the center. Then you should determine the distance from each field to the center (using the pythargoras-formula - that's why you are allowed to use sqrt), and decide based on that distance which character to use for that element - that way you'll get circles.

    Have fun trying!