please provide me codes how to construct circular matrix as below

1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7

#include<conio>
using namespace std;
#include<stdio>
using namespace std;
#include<iostream>
using namespace std;

void main ()
{
  
 int a;

 for(a=1;a<=10000;a=+1);
 {printf("101");}

getch();
}

hope this would help you eventhough it is not the output that you wanted.. just try to edit it and maybe you will get the output that you wanted.. ΓΌ

@bharatsinh - do you want an actual matrix object that can be multiplied, decomposed, etc? If so, you'll probably be best off using a big library like VXL. If you just want to output the numbers to the screen you can use thug line's code as a template. Also, I'm not sure that is a standard definition of a "circular matrix" - it seems like the numbers are spiraling around from the outside to the inside - in the future maybe you can explain what you are looking for a little bit better.

thug line - please use code tags.

Why is using namespace std typed 3 times?

Could you give us more information , so we can answer your question
better. Not that most will hand you the answer without seeing you
suffer:)

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.