Pruthvi Patel

Pruthvi Patel

  • NA
  • 12
  • 589

Convert one dimension array in to two dimensional array.

Nov 21 2016 11:54 AM
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)