aspose file tools*
The moose likes Java in General and the fly likes how to add number of digit in array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to add number of digit in array " Watch "how to add number of digit in array " New topic
Author

how to add number of digit in array

vineet walia
Ranch Hand

Joined: Feb 16, 2008
Posts: 138
please help me out

what i want is ...

1.user enter no of digit of tat number
2.thn use enter tat number

so i want to store tat number in array..
please help me out i try some code but unable to do
>
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

the final time through the loop,



always evaluates to zero

so num2 ends up being zero and this causes a division by zero error when you say

vineet walia
Ranch Hand

Joined: Feb 16, 2008
Posts: 138
Tim McGuire wrote:the final time through the loop,



always evaluates to zero

so num2 ends up being zero and this causes a division by zero error when you say



so how we can resolve this problem???
Janeice DelVecchio
Saloon Keeper

Joined: Sep 14, 2009
Posts: 1732
    
  12

You could loop one less time and handle outside the loop or set an if statement inside the loop to take care of the last entry.


When you do things right, people won't be sure you've done anything at all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to add number of digit in array