Dishant Verma wrote:How to convert NUMBER into CHARACTERS using "COLLECTIONS and GENERICS" ..?
Back to your pencil and paper. You can use / and % repeatedly. But you would require a loop.Dishant Verma wrote: . . . "I have used this. But it is upto 99,999. But I want to enter any number having length 'n'....
And How can I eliminate ifelse to make it more standardise.?"
Dishant Verma wrote:I want to enter any number having length 'n'....
There are only two hard things in computer science: cache invalidation, naming things, and offbyone errors
Campbell Ritchie wrote:Last time I looked in the Guiness Book of Records, they said the largest named number was the centillion, which has 601 digits.
Do all the numbers in between have names?Campbell Ritchie wrote:Last time I looked in the Guiness Book of Records, they said the largest named number was the centillion, which has 601 digits.
There are only two hard things in computer science: cache invalidation, naming things, and offbyone errors
fred rosenberger wrote:
Do all the numbers in between have names?Campbell Ritchie wrote:Last time I looked in the Guiness Book of Records, they said the largest named number was the centillion, which has 601 digits.
I'm pretty sure they don't all have names up to a googleplex, and this Graham's ?Number (which I had not heard of before) would be further proof you can't have names for all of them...
Jeff Verdegan wrote:"Grahamless1", "Grahamless2"
"Leadership is nature's way of removing morons from the productive flow"  Dogbert
Articles by Winston can be found here
Jeff Verdegan wrote:If we try to express it in scientific notation, the number of digits in the exponent is more than the number of atoms in the universe.
"Leadership is nature's way of removing morons from the productive flow"  Dogbert
Articles by Winston can be found here
Dennis Deems wrote: the position of the character would tell me tens, hundreds, thousands.
There are only two hard things in computer science: cache invalidation, naming things, and offbyone errors
Winston Gutkowski wrote:
Jeff Verdegan wrote:"Grahamless1", "Grahamless2"
I always liked the Ackermann function myself; so presumably a mathematician would allow A(G, G).
fred rosenberger wrote:
Dennis Deems wrote: the position of the character would tell me tens, hundreds, thousands.
This is true, but you get into some oddities with number like "13". You don't want "13,000" to come out as "ten thousand three thousand"
fred rosenberger wrote:
Dishant Verma wrote:I want to enter any number having length 'n'....
You are going to have to define what the max. of 'n' is, since there is no limit to the number someone can put in. For example, I could (theorieticaly) input a number that has a thousand digits. Do you really want to be able to handle that? I'm not even sure there are words for number that big...
Campbell Ritchie wrote:Last time I looked in the Guiness Book of Records, they said the largest named number was the centillion, which has 601 digits.
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890
one duotrigintatrecentillion two hundred and thirty four untrigintatrecentillion five hundred and sixty seven trigintatrecentillion eight hundred and ninety novemvigintitrecentillion one hundred and twenty three octovigintitrecentillion four hundred and fifty six septemvigintitrecentillion seven hundred and eighty nine sesvigintitrecentillion twelve quinquavigintitrecentillion three hundred and forty five quattuorvigintitrecentillion six hundred and seventy eight tresvigintitrecentillion nine hundred and one duovigintitrecentillion two hundred and thirty four unvigintitrecentillion five hundred and sixty seven vigintitrecentillion eight hundred and ninety novendecitrecentillion one hundred and twenty three octodecitrecentillion four hundred and fifty six septendecitrecentillion seven hundred and eighty nine sedecitrecentillion twelve quinquadecitrecentillion three hundred and forty five quattuordecitrecentillion six hundred and seventy eight tredecitrecentillion nine hundred and one duodecitrecentillion two hundred and thirty four undecitrecentillion five hundred and sixty seven decitrecentillion eight hundred and ninety noventrecentillion one hundred and twenty three octotrecentillion four hundred and fifty six septentrecentillion seven hundred and eighty nine sestrecentillion twelve quinquatrecentillion three hundred and forty five quattuortrecentillion six hundred and seventy eight trestrecentillion nine hundred and one duotrecentillion two hundred and thirty four untrecentillion five hundred and sixty seven trecentillion eight hundred and ninety novenonagintaducentillion one hundred and twenty three octononagintaducentillion four hundred and fifty six septenonagintaducentillion seven hundred and eighty nine senonagintaducentillion twelve quinquanonagintaducentillion three hundred and forty five quattuornonagintaducentillion six hundred and seventy eight trenonagintaducentillion nine hundred and one duononagintaducentillion two hundred and thirty four unnonagintaducentillion five hundred and sixty seven nonagintaducentillion eight hundred and ninety novemoctogintaducentillion one hundred and twenty three octooctogintaducentillion four hundred and fifty six septemoctogintaducentillion seven hundred and eighty nine sexoctogintaducentillion twelve quinquaoctogintaducentillion three hundred and forty five quattuoroctogintaducentillion six hundred and seventy eight tresoctogintaducentillion nine hundred and one duooctogintaducentillion two hundred and thirty four unoctogintaducentillion five hundred and sixty seven octogintaducentillion eight hundred and ninety novenseptuagintaducentillion one hundred and twenty three octoseptuagintaducentillion four hundred and fifty six septenseptuagintaducentillion seven hundred and eighty nine seseptuagintaducentillion twelve quinquaseptuagintaducentillion three hundred and forty five quattuorseptuagintaducentillion six hundred and seventy eight treseptuagintaducentillion nine hundred and one duoseptuagintaducentillion two hundred and thirty four unseptuagintaducentillion five hundred and sixty seven septuagintaducentillion eight hundred and ninety novensexagintaducentillion one hundred and twenty three octosexagintaducentillion four hundred and fifty six septensexagintaducentillion seven hundred and eighty nine sesexagintaducentillion twelve quinquasexagintaducentillion three hundred and forty five quattuorsexagintaducentillion six hundred and seventy eight tresexagintaducentillion nine hundred and one duosexagintaducentillion two hundred and thirty four unsexagintaducentillion five hundred and sixty seven sexagintaducentillion eight hundred and ninety novenquinquagintaducentillion one hundred and twenty three octoquinquagintaducentillion four hundred and fifty six septenquinquagintaducentillion seven hundred and eighty nine sesquinquagintaducentillion twelve quinquaquinquagintaducentillion three hundred and forty five quattuorquinquagintaducentillion six hundred and seventy eight tresquinquagintaducentillion nine hundred and one duoquinquagintaducentillion two hundred and thirty four unquinquagintaducentillion five hundred and sixty seven quinquagintaducentillion eight hundred and ninety novenquadragintaducentillion one hundred and twenty three octoquadragintaducentillion four hundred and fifty six septenquadragintaducentillion seven hundred and eighty nine sesquadragintaducentillion twelve quinquaquadragintaducentillion three hundred and forty five quattuorquadragintaducentillion six hundred and seventy eight tresquadragintaducentillion nine hundred and one duoquadragintaducentillion two hundred and thirty four unquadragintaducentillion five hundred and sixty seven quadragintaducentillion eight hundred and ninety noventrigintaducentillion one hundred and twenty three octotrigintaducentillion four hundred and fifty six septentrigintaducentillion seven hundred and eighty nine sestrigintaducentillion twelve quinquatrigintaducentillion three hundred and forty five quattuortrigintaducentillion six hundred and seventy eight trestrigintaducentillion nine hundred and one duotrigintaducentillion two hundred and thirty four untrigintaducentillion five hundred and sixty seven trigintaducentillion eight hundred and ninety novemvigintiducentillion one hundred and twenty three octovigintiducentillion four hundred and fifty six septemvigintiducentillion seven hundred and eighty nine sesvigintiducentillion twelve quinquavigintiducentillion three hundred and forty five quattuorvigintiducentillion six hundred and seventy eight tresvigintiducentillion nine hundred and one duovigintiducentillion two hundred and thirty four unvigintiducentillion five hundred and sixty seven vigintiducentillion eight hundred and ninety novendeciducentillion one hundred and twenty three octodeciducentillion four hundred and fifty six septendeciducentillion seven hundred and eighty nine sedeciducentillion twelve quinquadeciducentillion three hundred and forty five quattuordeciducentillion six hundred and seventy eight tredeciducentillion nine hundred and one duodeciducentillion two hundred and thirty four undeciducentillion five hundred and sixty seven deciducentillion eight hundred and ninety novenducentillion one hundred and twenty three octoducentillion four hundred and fifty six septenducentillion seven hundred and eighty nine seducentillion twelve quinquaducentillion three hundred and forty five quattuorducentillion six hundred and seventy eight treducentillion nine hundred and one duoducentillion two hundred and thirty four unducentillion five hundred and sixty seven ducentillion eight hundred and ninety novenonagintacentillion one hundred and twenty three octononagintacentillion four hundred and fifty six septenonagintacentillion seven hundred and eighty nine senonagintacentillion twelve quinquanonagintacentillion three hundred and forty five quattuornonagintacentillion six hundred and seventy eight trenonagintacentillion nine hundred and one duononagintacentillion two hundred and thirty four unnonagintacentillion five hundred and sixty seven nonagintacentillion eight hundred and ninety novemoctogintacentillion one hundred and twenty three octooctogintacentillion four hundred and fifty six septemoctogintacentillion seven hundred and eighty nine sexoctogintacentillion twelve quinquaoctogintacentillion three hundred and forty five quattuoroctogintacentillion six hundred and seventy eight tresoctogintacentillion nine hundred and one duooctogintacentillion two hundred and thirty four unoctogintacentillion five hundred and sixty seven octogintacentillion eight hundred and ninety novenseptuagintacentillion one hundred and twenty three octoseptuagintacentillion four hundred and fifty six septenseptuagintacentillion seven hundred and eighty nine seseptuagintacentillion twelve quinquaseptuagintacentillion three hundred and forty five quattuorseptuagintacentillion six hundred and seventy eight treseptuagintacentillion nine hundred and one duoseptuagintacentillion two hundred and thirty four unseptuagintacentillion five hundred and sixty seven septuagintacentillion eight hundred and ninety novensexagintacentillion one hundred and twenty three octosexagintacentillion four hundred and fifty six septensexagintacentillion seven hundred and eighty nine sesexagintacentillion twelve quinquasexagintacentillion three hundred and forty five quattuorsexagintacentillion six hundred and seventy eight tresexagintacentillion nine hundred and one duosexagintacentillion two hundred and thirty four unsexagintacentillion five hundred and sixty seven sexagintacentillion eight hundred and ninety novenquinquagintacentillion one hundred and twenty three octoquinquagintacentillion four hundred and fifty six septenquinquagintacentillion seven hundred and eighty nine sesquinquagintacentillion twelve quinquaquinquagintacentillion three hundred and forty five quattuorquinquagintacentillion six hundred and seventy eight tresquinquagintacentillion nine hundred and one duoquinquagintacentillion two hundred and thirty four unquinquagintacentillion five hundred and sixty seven quinquagintacentillion eight hundred and ninety novenquadragintacentillion one hundred and twenty three octoquadragintacentillion four hundred and fifty six septenquadragintacentillion seven hundred and eighty nine sesquadragintacentillion twelve quinquaquadragintacentillion three hundred and forty five quattuorquadragintacentillion six hundred and seventy eight tresquadragintacentillion nine hundred and one duoquadragintacentillion two hundred and thirty four unquadragintacentillion five hundred and sixty seven quadragintacentillion eight hundred and ninety noventrigintacentillion one hundred and twenty three octotrigintacentillion four hundred and fifty six septentrigintacentillion seven hundred and eighty nine sestrigintacentillion twelve quinquatrigintacentillion three hundred and forty five quattuortrigintacentillion six hundred and seventy eight trestrigintacentillion nine hundred and one duotrigintacentillion two hundred and thirty four untrigintacentillion five hundred and sixty seven trigintacentillion eight hundred and ninety novemviginticentillion one hundred and twenty three octoviginticentillion four hundred and fifty six septemviginticentillion seven hundred and eighty nine sesviginticentillion twelve quinquaviginticentillion three hundred and forty five quattuorviginticentillion six hundred and seventy eight tresviginticentillion nine hundred and one duoviginticentillion two hundred and thirty four unviginticentillion five hundred and sixty seven viginticentillion eight hundred and ninety novendecicentillion one hundred and twenty three octodecicentillion four hundred and fifty six septendecicentillion seven hundred and eighty nine sedecicentillion twelve quinquadecicentillion three hundred and forty five quattuordecicentillion six hundred and seventy eight tredecicentillion nine hundred and one duodecicentillion two hundred and thirty four undecicentillion five hundred and sixty seven decicentillion eight hundred and ninety novencentillion one hundred and twenty three octocentillion four hundred and fifty six septencentillion seven hundred and eighty nine sexcentillion twelve quinquacentillion three hundred and forty five quattuorcentillion six hundred and seventy eight trescentillion nine hundred and one duocentillion two hundred and thirty four uncentillion five hundred and sixty seven centillion eight hundred and ninety novenonagintillion one hundred and twenty three octononagintillion four hundred and fifty six septenonagintillion seven hundred and eighty nine senonagintillion twelve quinquanonagintillion three hundred and forty five quattuornonagintillion six hundred and seventy eight trenonagintillion nine hundred and one duononagintillion two hundred and thirty four unnonagintillion five hundred and sixty seven nonagintillion eight hundred and ninety novemoctogintillion one hundred and twenty three octooctogintillion four hundred and fifty six septemoctogintillion seven hundred and eighty nine sexoctogintillion twelve quinquaoctogintillion three hundred and forty five quattuoroctogintillion six hundred and seventy eight tresoctogintillion nine hundred and one duooctogintillion two hundred and thirty four unoctogintillion five hundred and sixty seven octogintillion eight hundred and ninety novenseptuagintillion one hundred and twenty three octoseptuagintillion four hundred and fifty six septenseptuagintillion seven hundred and eighty nine seseptuagintillion twelve quinquaseptuagintillion three hundred and forty five quattuorseptuagintillion six hundred and seventy eight treseptuagintillion nine hundred and one duoseptuagintillion two hundred and thirty four unseptuagintillion five hundred and sixty seven septuagintillion eight hundred and ninety novensexagintillion one hundred and twenty three octosexagintillion four hundred and fifty six septensexagintillion seven hundred and eighty nine sesexagintillion twelve quinquasexagintillion three hundred and forty five quattuorsexagintillion six hundred and seventy eight tresexagintillion nine hundred and one duosexagintillion two hundred and thirty four unsexagintillion five hundred and sixty seven sexagintillion eight hundred and ninety novenquinquagintillion one hundred and twenty three octoquinquagintillion four hundred and fifty six septenquinquagintillion seven hundred and eighty nine sesquinquagintillion twelve quinquaquinquagintillion three hundred and forty five quattuorquinquagintillion six hundred and seventy eight tresquinquagintillion nine hundred and one duoquinquagintillion two hundred and thirty four unquinquagintillion five hundred and sixty seven quinquagintillion eight hundred and ninety novenquadragintillion one hundred and twenty three octoquadragintillion four hundred and fifty six septenquadragintillion seven hundred and eighty nine sesquadragintillion twelve quinquaquadragintillion three hundred and forty five quattuorquadragintillion six hundred and seventy eight tresquadragintillion nine hundred and one duoquadragintillion two hundred and thirty four unquadragintillion five hundred and sixty seven quadragintillion eight hundred and ninety noventrigintillion one hundred and twenty three octotrigintillion four hundred and fifty six septentrigintillion seven hundred and eighty nine sestrigintillion twelve quinquatrigintillion three hundred and forty five quattuortrigintillion six hundred and seventy eight trestrigintillion nine hundred and one duotrigintillion two hundred and thirty four untrigintillion five hundred and sixty seven trigintillion eight hundred and ninety novemvigintillion one hundred and twenty three octovigintillion four hundred and fifty six septemvigintillion seven hundred and eighty nine sesvigintillion twelve quinquavigintillion three hundred and forty five quattuorvigintillion six hundred and seventy eight tresvigintillion nine hundred and one duovigintillion two hundred and thirty four unvigintillion five hundred and sixty seven vigintillion eight hundred and ninety novendecillion one hundred and twenty three octodecillion four hundred and fifty six septendecillion seven hundred and eighty nine sedecillion twelve quinquadecillion three hundred and forty five quattuordecillion six hundred and seventy eight tredecillion nine hundred and one duodecillion two hundred and thirty four undecillion five hundred and sixty seven decillion eight hundred and ninety nonillion one hundred and twenty three octillion four hundred and fifty six septillion seven hundred and eighty nine sextillion twelve quintillion three hundred and forty five quadrillion six hundred and seventy eight trillion nine hundred and one billion two hundred and thirty four million five hundred and sixty seven thousand eight hundred and ninety
Jeff Verdegan wrote:Googolplex anyone?
Henry Wong wrote:kudos to those who knows how I was able to determine that in my head
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck
How to Ask Questions  How to Answer Questions  Format Your Code
Campbell Ritchie wrote:I know how to prove that technique works, too.
Henry Wong wrote:It is amazing, IMO, of the stuff that people learn while in grade school, that you think that you will never use ever  and then, thirty years later, you remember it, and use it !!
The best ideas are the crazy ones. If you have a crazy idea and it works, it's really valuable.—Kent Beck
How to Ask Questions  How to Answer Questions  Format Your Code
Meghana Reddy
Meghana Reddy wrote:Just curious, Why bother about a 1000 digit number when java has a max value for Long which is 9223372036854775807 and is only 19 digits.
Meghana Reddy
Jeff Verdegan wrote:
Meghana Reddy wrote:Just curious, Why bother about a 1000 digit number when java has a max value for Long which is 9223372036854775807 and is only 19 digits.
java.math.BigInteger
Meghana Reddy wrote:Thanks Jeff. I never have had to use it before.
I am Arthur, King of the Britons. And this is a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
