The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Urgent any one plz help

Posted by Matt Gerrans on October 27, 2001 at 8:49 PM

Well, it looks like you understand the assignment well enough to explain it. What part do you need help with?

By the way, just a note on nomenclature: a "bi-array" would be one that is enjoys sex with both male and female arrays. A "two-dimensional" (or 2-D) array, on the other hand, would simply be an array that has two dimensions (eg. int[][] a = { { 1, 2, 3, }, { 4, 5, 6, },}; ).

- mfg

> Hello;
> I need your help in a java assigments,the task is to:
> 1.create a bi-dimensioanl array of a number which is enterd from dos prompt into args array and the number should be odd number:
> e.g :
> java Test 5 or java Test 9
> 2.Now 1 should be stored in mid of the array
> for example if I enter 9 at dos prompt ,so the value 1 should be stored at row # 0 and column # 5 of the array
> which is the midd # of 9.
> now throw a loop you have to make a table like: e.g
> if I pass 3 at dos prompt and an array of 3 by 3 is created .
> so at last when I print it it should look like this
>

> 8 1 6
> 3 5 7
> 4 9 2
> so If I calculate them in any order it will result 15.
> 3.the example I gave was only of a 3 by 3 array
> it should work the same with 7 by 7 bi-array or 9 by 9 bi- array and so on.
> Tanx in advacn





Replies:
  • heheh Chin Loong October 27, 2001 at 10:55 PM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us