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


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: please me

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Location
    Bangalore
    Posts
    15
    My Mood
    Confused
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default please me

    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.

  2. #2
    Member angstrem's Avatar
    Join Date
    Mar 2013
    Location
    Ukraine
    Posts
    200
    My Mood
    Happy
    Thanks
    9
    Thanked 31 Times in 29 Posts

    Default Re: please me

    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)

  4. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: please me

    Quote Originally Posted by angstrem View Post
    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).
    @angstrem please read The problem with spoonfeeding

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

    amul (July 8th, 2013)

  6. #4
    Junior Member
    Join Date
    Jul 2013
    Posts
    2
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: please me

    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)

  8. #5
    Junior Member
    Join Date
    Jun 2013
    Location
    Bangalore
    Posts
    15
    My Mood
    Confused
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: please me

    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 ---

    awesome your sir

    --- Update ---

    great sir