JAVA output 99 multiplication table

Introduction: JAVA output 99 multiplication table

Two loops can be solved
public static void main ( String[] args ) {
//99 multiplication table
int n;
for ( int a = 1 ; a <= 9 ; a++) {
for ( int b = 1 ; b <= a; b++) {
n = a * b;
System.out.printf ( "%d*%d=%2d " , a, b, n);
}
System.out.println ();

}
}

Copyright statement: The content of this article is contributed by Alibaba Cloud's real-name registered users. The copyright belongs to the original author. The Alibaba Cloud developer community does not own the copyright and does not assume the corresponding legal responsibility. For specific rules, please refer to the " Alibaba Cloud Developer Community User Service Agreement " and " Alibaba Cloud Developer Community Intellectual Property Protection Guidelines ". If you find any content suspected of plagiarism in this community, fill out the infringement complaint form to report it. Once verified, this community will delete the allegedly infringing content immediately.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00