Java Print 99 multiplication table

Source: Internet
Author: User

1  PackageCom.czgo;2 3 /**4 * 99 multiplication table5  * 6  * @authorAlanlee7  *8  */9  Public classPrint99 {Ten  One      Public Static voidMain (string[] args) { A          -System.out.println ("99 Multiplication Table"); -System.out.print (""); the         //first print out the first line 1-9 -          for(inti = 1; I <= 9; i++) { -System.out.print (i + "")); -         } + System.out.println (); -          for(inti = 1; I <= 9; i++) { +             //each line prints out the line that is currently the first row ASystem.out.print (i + "")); at              for(intj = 1; J <= 9; J + +) { -                 if(J <=i) { -                     //print out the calculation results -System.out.print (i + "*" + j + "=" + I * j + ""); -                 } -             } in             //Wrap every time you finish a loop - System.out.println (); to         } +     } -  the}

Java Print 99 multiplication table

Related Article

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.