p.259 6.12

  1. package firstjava;
  2. import java.util.Scanner;
  3. public class DisplayNum {
  4.     public static void display (int a, int b){
  5.     int i,j;
  6.     for ( i=; i<=; i++ )   
  7.         {
  8.         for ( j=0 ; j<10 ; j++ )
  9.             System.out.println(i+" ");
  10.         System.out.println("\n");
  11.         }
  12.     }
  13.     public static void main(String[] args) {
  14.         // TODO Auto-generated method stub
  15.         // input
  16.         Scanner input = new Scanner(System.in);
  17.         int iNum = input.nextInt();
  18.         int iNum2 = input.nextInt();
  19.         // call function
  20.         display(iNum, iNum2);  
  21.     }
  22. }

留言

這個網誌中的熱門文章

Codeforces --- string task

Uva 674 ---- coin change

codeforces 271A --- beautiful year