Java loop structure
iDunno
Dallas, Tejas
Hello, i need help on a loop stucture for a java programming i am doing.
Imagine that you have a 20x20 grid and i need to get "fishes" to appear clockwise starting at the top left corner, then going in circles, in a swirl pattern, clockwise.
01 02 03 04 05 06 07 08 09 10
38 39 40 41 42 43 44 45 46 11
37 ****************47 12
36*****************48 13
35*****************49 14
34*****************50 15
33*****************51 16
32********************17
31 *******************18
30********************19
29 28 27 26 25 24 23 22 21 20
and so on
if i could get a basic loop stucture, taht would be good
thanks
Imagine that you have a 20x20 grid and i need to get "fishes" to appear clockwise starting at the top left corner, then going in circles, in a swirl pattern, clockwise.
01 02 03 04 05 06 07 08 09 10
38 39 40 41 42 43 44 45 46 11
37 ****************47 12
36*****************48 13
35*****************49 14
34*****************50 15
33*****************51 16
32********************17
31 *******************18
30********************19
29 28 27 26 25 24 23 22 21 20
and so on
if i could get a basic loop stucture, taht would be good
thanks
0
Comments
Also, how is it indexed?
0,0...n,0
.
.
.
0,m...n,m
i assume?
thanks anyways!
attached are all the files if you want to execute it and see the output