Created
May 6, 2013 17:43
-
-
Save jimmy087/5526720 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Exercise5_12 { | |
| public static void main (String[] args) { | |
| printChars ('1', 'z', 10); | |
| } | |
| public static void printChars(char ch1, char ch2, int numberPerLine) { | |
| // TODO Auto-generated method stub. | |
| int count = 1; | |
| for (int i = ch1; i <= ch2; i++,count++) { | |
| if (count % numberPerLine == 0) | |
| System.out.println((char)i); | |
| else | |
| System.out.print((char)i); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment