Results 1 to 2 of 2
  1. #1
    Gan
    Gan is offline Member
    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    Default Need to print pattern in java

    Hi All,

    i need to print pattern like below shown,


    OUTPUT should look like this,

    1AAAAAAAAA
    1AAAAAAAAB
    1AAAAAAAAC
    1AAAAAAAAD
    :
    :
    1AAAAAAAAZ
    :
    :
    1AAAAAAABA
    1AAAAAAACA
    :
    :
    so on
    at the end
    1BAAAAAAAA
    :
    :
    1ZAAAAAAAA
    :
    :
    1BAAAAAAAB
    :
    so on
    this is what i want in which i want to convert each number into ASCII code so that i can apply mod logic on each number.
    Basically i want to ganesrate a Referance number which is having 10 digit only and it should be infinite kind of number so that only 10 digit number should not be end at least 100 years.

    Thanks and Regards,
    Gan

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,525
    Blog Entries
    7
    Rep Power
    20

    Default

    You want to count using the 'digits' A to Z. If you count up and the current digit equals Z already you reset it to the value A and continue with the digit to the 'left' of it. If there isn't a digit to the left anymore you have reset all the digits to the value A and you can't count anymore (or you start all over again).

    kind regards,

    Jos

Similar Threads

  1. Class pattern to generate following pattern:-
    By vxs in forum New To Java
    Replies: 5
    Last Post: 07-14-2010, 11:15 PM
  2. Regex Pattern/Matcher - Print only one occurrence!
    By racha0601 in forum Advanced Java
    Replies: 3
    Last Post: 04-06-2009, 05:05 PM
  3. Replies: 11
    Last Post: 04-16-2008, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •