Challenge: make a spiral pattern
example: if user input the no. of rows =5 then output should be 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
","upvoteCount":9},{"@type":"Answer","text":"https://code.sololearn.com/cc56x7Cm5qL9/?ref=app","upvoteCount":9},{"@type":"Answer","text":"Change 3rd last line\nvar edge=prompt(\"Type your number\");","upvoteCount":8},{"@type":"Answer","text":"?","upvoteCount":7},{"@type":"Answer","text":"mine with python\r\n\r\nhttps://code.sololearn.com/cr3JNgojkQyZ/#py","upvoteCount":7},{"@type":"Answer","text":"Here's mine:\n\nhttps://code.sololearn.com/WoEZXsyny2IU/?ref=app","upvoteCount":4},{"@type":"Answer","text":"from an earlier challenge\n\nhttps://code.sololearn.com/cr5Ta5FcBrZ2/?ref=app","upvoteCount":4},{"@type":"Answer","text":"https://code.sololearn.com/cDl89f5732Yo/?ref=app","upvoteCount":4},{"@type":"Answer","text":"https://code.sololearn.com/cHAKFqDgtOJU","upvoteCount":3},{"@type":"Answer","text":"https://code.sololearn.com/cLdw7u9I3GvY/?ref=app","upvoteCount":2},{"@type":"Answer","text":"My attempt. \r\nhttps://code.sololearn.com/cG9mBPzt2fis/#cpp","upvoteCount":2},{"@type":"Answer","text":"https://code.sololearn.com/c3iqKylTbk46/?ref=app","upvoteCount":2},{"@type":"Answer","text":"https://code.sololearn.com/c8OeV7di4VTn/?ref=app","upvoteCount":0}]} }
example: if user input the no. of rows =5 then output should be 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9