Not able to get this output as below:
Need to do this using an array and for loops.
In google i find the solution to be difficults. Suggest pls
1 8 9 16
2 7 10 15
3 6 11 14
4 5 12 13
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 3, 2017, 9:23 PM EST
Nakhia Sharma37 reputationPosted Dec 3, 2017, 12:52 AM EST
Sameer ShaikRank #1,825 · 812 reputationPosted Dec 3, 2017, 1:53 AM EST
Ankit SharmaRank #141 · 16.1K reputationPosted Dec 3, 2017, 2:29 AM EST