#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    10
    Rep Power
    0

    Perl program to print square matrix in spiral


    I need program to print spiral square matrix..
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Posts
    832
    Rep Power
    496
    Can you please explain further?
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    10
    Rep Power
    0
    29--28--27--26--25--24--23--22
    | |
    30 11--10--9--8--7--6 21
    | | | |
    31 12 1--2--3--4--5 20
    | | |
    32 13--14--15--16--17--18--19
    |
    33--34--35--36-...

    I want output like this..

    could you make code for this....
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    10
    Rep Power
    0
    Pls ignore previous reply which got actual structure changed..


    Please refer this link http://search.cpan.org/~kryde/Math-PlanePath-92/lib/Math/PlanePath/SquareSpiral.pm

    see the detailed algorithm of square spiral matrix generation..

    If u understand clearly write a perl program for this and post it .. pls help.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,940
    Rep Power
    1225
    If u understand clearly write a perl program for this and post it
    LOL

    You've got to be joking. This is not a script writing service.

    If you want someone to do your classwork for you, then hire a programmer

IMN logo majestic logo threadwatch logo seochat tools logo