Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

if the value is= 13276125962;
then return =13276125973
13276125984
13276125995
13276126006
13276126010
13276126021
13276126032
13276126043
13276126054
13276126065
13276126076
13276126080
13276126091
13276126102
13276126113
13276126124
13276126135
13276126146
13276126150
13276126161
13276126172
13276126183
13276126194
13276126205
13276126216
13276126220
13276126231
13276126242
13276126253
13276126264
13276126275
13276126286
13276126290
13276126301
13276126312
13276126323
13276126334
13276126345
13276126356
13276126360
13276126371
13276126382
13276126393
13276126404
13276126415
13276126426
13276126430
13276126441
13276126452
13276126463
13276126474
13276126485
13276126496
13276126500
13276126511
13276126522
13276126533
13276126544
............
how to do please reply with short example, i am very serious to know this looping system.

Every time 1st least significant digit == 6, increment 2nd least significant digit by 1 and set 1st to 0. In all other cases increment both by 1 (or the number by 11).

3. The Following 2 Users Say Thank You to angstrem For This Useful Post:

amul (July 8th, 2013), GregBrannon (July 7th, 2013)

Originally Posted by angstrem
Every time 1st least significant digit == 6, increment 2nd least significant digit by 1 and set 1st to 0. In all other cases increment both by 1 (or the number by 11).

5. The Following User Says Thank You to jps For This Useful Post:

amul (July 8th, 2013)

Amul, please explain more on what you are trying to do. There are different ways to loop.

7. The Following User Says Thank You to vinceishere For This Useful Post:

amul (July 8th, 2013)

thanks Sir actually i have been done the problem, there is have just add increment value in for loop.
example

long start= 13276125962;
long end= 13276126544;
int increment= 11;
for (long i=start;i<=end;i+=increment){
System.out.println(i);

--- Update ---