Results 1 to 2 of 2
Thread: Need to print pattern in java
- 10-20-2010, 06:56 AM #1
Member
- Join Date
- Oct 2010
- Posts
- 1
- Rep Power
- 0
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
- 10-20-2010, 08:36 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
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
-
Class pattern to generate following pattern:-
By vxs in forum New To JavaReplies: 5Last Post: 07-14-2010, 11:15 PM -
Regex Pattern/Matcher - Print only one occurrence!
By racha0601 in forum Advanced JavaReplies: 3Last Post: 04-06-2009, 05:05 PM -
How to Print out adiamond pattern I try this code but
By masaka in forum New To JavaReplies: 11Last Post: 04-16-2008, 01:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks