Java language Print 99 multiplication table _java

Source: Internet
Author: User

This is a child back of the 99 multiplication table, is the Chinese version, not a digital version, with a Java program to print out.
The Java source program is as follows:

Package com.elephant.multiply99table;

public class Multiply99table {public
 static String Convert (int digit) {
 string[] digitwords = {"Ten", "One", "two", "three "," Four "," five "," six "," seven "," eight ",
 " Nine "};
 if (digit <) return
 Digitwords[digit];
 else if (digit =) return
 DIGITWORDS[DIGIT/10] + digitwords[0];
 else return
 DIGITWORDS[DIGIT/10] + digitwords[0]
  + digitwords[digit%];
 }

 public static void Main (string[] args) {for
 (int i = 1; I <= 9; i++) {for
 (int j = i; J <= 9; j +) {
   system.out.print (CONVERT (i) + convert (j)
  + ((i * j >= 10)? "": "Get") + Convert (i * j));
 System.out.print ((i * j > 10)? "": ""));
 System.out.println (""); NewLine
 }}
 }

The results of the program operation are as follows:

One by one to 112, 213 to 314 415 to 516 to 617 to 718 to nine.
22 to 423, 624 to 2.,612,271,428,245,43e,+15.
33 is 2.,351,536,183,721,38e,+20.
6.,452,462,447,284,83e,+19
556,357,355,851,465
6,674,268,493,584
978,575,703
57,832
9,981
  

The above is the entire content of this article, I hope to learn Java program to help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.