Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[b]Need Help Plzzz..How do I split a 2D array??[/b]

807605Jul 15 2007 — edited Jul 15 2007
I have a 2 dimensional array with integers in it..I need to split the 2 dimensional array into parts and add all values in each part.This is how it works.When i give a number 'n' as input it should divide the array into 'n^2' equal parts.

For ex:if i have a 6x6 array & when i give an input as 3 it should split the array into 9 equal parts i:e each array should be of size 2x2.
For the same 6x6 array if i give an input as 2 then it should divide the array into 4 equal parts i:e each array should be of size 3x3.I need this to be done only for even numbered perfect square arrays i:e2x2,4x4,6x6 etc...hope u understood.Can somebody help me on this ASAP.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 12 2007
Added on Jul 15 2007
52 comments
976 views