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! |