rss
Twitter Delicious Facebook Digg Stumbleupon Favorites

Saturday, October 8, 2011

Display Multiplication Table

In mathematics, a multiplication table (sometimes, less formally, a times table) is a mathematical table used to define a multiplication operation for an algebraic system.
The decimal multiplication table was traditionally taught as an essential part of elementary arithmetic around the world, as it lays the foundation for arithmetic operations with our base-ten numbers. Many educators believe it is necessary to memorize the table up to 9 × 9.
In his 1820 book The Philosophy of Arithmetic, mathematician John Leslie published a multiplication table up to 99 × 99, which allows numbers to be multiplied in pairs of digits at a time. Leslie also recommended that young pupils memorize the multiplication table up to 25 × 25.
The table is sometimes attributed to Pythagoras. It is also called the Table of Pythagoras in many languages (for example French, Italian and Russian), sometimes in English.
In 493 A.D., Victorius of Aquitaine wrote a 98-column multiplication table which gave (in Roman numerals) the product of every number from 2 to 50 times and the rows were "a list of numbers starting with one thousand, descending by hundreds to one hundred, then descending by tens to ten, then by ones to one, and then the fractions down to 1/144" (Maher & Makowski 2001, p.383)


class MTable{
      public static void main(String args[]){
      int num = Integer.parseInt(args[0]);
      System.out.println("*****MULTIPLICATION TABLE*****");
      for(int i=1;i<=num;i++){
         for(int j=1;j<=num;j++){
            System.out.print(" "+i*j+" ");
         }
         System.out.print("\n");
      }
  }
}

0 comments:

Post a Comment

Powered by Blogger.