Jump to content

Making an array of 'n' digits


Recommended Posts

Dear friends,

 

It's not just the way of coding but I want to now how can we make an array of "n" digits, for example if "n" equals "3" then we should have an array of 100 to 999, and for "n" equal 2 we should have array of 10 to 99.

 

Any help or ideas how to do this will be appriciated!

Link to comment
Share on other sites

Thanks, it seems to be a good idea, But actually I want to do it with any value for "n". maybe user enter 10 as "n" so we need to have array of 1000000000 to 9999999999.

 

like this, we need to have a large switch statement, I am looking for a gerenarl way or formula for this.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.