0

I need to define a number between n, such that 999<n<9999, and I'm not sure how to do that.

I've tried to make an If situation out of it, but I couldn't reach further because my number is not defined. Also this is for a Java package.

Giorgi Tsiklauri
  • 9,715
  • 8
  • 45
  • 66
  • Please add some code... And read this https://stackoverflow.com/help/how-to-ask – vincent PHILIPPE Sep 26 '20 at 10:16
  • Are you looking for the generation of a random number in that range? what do you mean, in - *my number is not defined*? why don't you define if you need it? it's unclear what you're asking. Please be more specific. – Giorgi Tsiklauri Sep 26 '20 at 10:21
  • Ok, *n* = 1235. Seriously, besides your lower and upper limit, what are the criteria for determining *n*? – Gilbert Le Blanc Sep 26 '20 at 10:25
  • For example, my number would be inserted in my input so that my java can tell me how many decimals that my given number has, if I put in as answer 4859 it will tell me that I have 4 thousands, 8 hundreds, 5 tens and 9 units. But I require to make the number that I will put - a number that I can change when I run my code, stay between a range of to 999 to 9999. – Alain-Prince Niyonkuru Sep 26 '20 at 16:18
  • Does this answer your question? [How do I generate random integers within a specific range in Java?](https://stackoverflow.com/questions/363681/how-do-i-generate-random-integers-within-a-specific-range-in-java) – Ali Motameni Sep 27 '20 at 06:27

0 Answers0