This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Sum minus same as paper Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Sum minus same as paper" Watch "Sum minus same as paper" New topic
Author

Sum minus same as paper

Miguel Enriquez
Ranch Hand

Joined: Mar 13, 2004
Posts: 94
hi all
basic question: how declare a array of integers multidimensional and not know the number of cols, rows?
basically i need do these:
12598
456
--------
13054

or a minus.... then i think in a multidimensional array but not know the nmber of elements, in tese case i know the length of both numbers but what happend with the carriage?
carriage for me is: 10+4 = 4 and 1 is the carriage
thanks
Eddie Vanda
Ranch Hand

Joined: Mar 18, 2003
Posts: 281
Hi Miguel,
That is not a simple task. You probably should look at single dimension arrays first - maybe take a look at ArrayList. Then extend that to the first array holding the pointers to the arrays in the second dimension.
Good luck
Ed


The nice thing about Standards is that there are so many to choose from!
 
 
subject: Sum minus same as paper