Can any one help me out to provide code for a following matrix for N numbers?

12345
21234
32123
43212
54321

Please Help me out for this matrix

How would you do it on paper? Programming is problem solving. What's the simple pattern here that tells you what to write on every line?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.