HW5.12

HW5.12

 public class Solution
 {
     public static void main(String[] args)
     {
         printChars('1', 'Z', 10);
     }

     public static void printChars(char ch1, char ch2, int numberPerLine)
     {
         int count = 0;
         int start = (int)ch1;
         int end = (int)ch2;

         for(int i = start; i <= end; i++)
         {
             System.out.print((char)i + " ");
             count++;
             if(count == numberPerLine)
             {
                 System.out.println();
                 count = 0;
             }
         }
     }
 }
上一篇:Python学习-使用matplotlib画动态多图


下一篇:Android设计模式(十)--生成器模式