3
Answers

Convert one dimension array in to two dimensional array.

Pruthvi Patel

Pruthvi Patel

7y
241
1
strarr[]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18}
row=6
col=3 
deimal[,] strArr1=new decimal[row,col] ; 
then this array should be converted in to two dimensional as row and column given.
 strArr1[,] should be like this
1    2   3
4    5   6
7    8   9
10 11 12
13 14 15
16 17 18 

Answers (3)