5
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by |\|asrin
0

Hi
I want to have a n*n matrix
is there sombody to help me??
how i can write it??

You may start by making a two dimensional
array, say

matrix[n][n];

, and store values in that array.

I'm sorry for this nonsense post. Just trying something good out after reading the rules.

0

Start with declaring a 2 dimensional array.

int arr[x][y];

X and y may be input by user or may be fixed to a very high value.Your choice.
Now just Input the values to store in this array as you do normally using a loop...

for(int i=0;i<x;i++)
for(int j=0;j<y;j++)

//input your values...

ALso let us know how much work have you done...

0

tnx for your answers ,actually my question was about the n*n matrixs that we do not know their parameter (n) .we will get the parameter from user .any way my question has solved .
thanks again & Bye

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.