Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1. public class MultiplicationTable{
  2.     public static void main(String[] args){
  3.     System.out.println("x  | 1\t2\t3\t4\t5\t6\t7\t8\t9 ");
  4.     System.out.println("===+=================================================================");
  5.     for(int x=1; x<=12; x++){
  6.         if (x < 10 )
  7.                 System.out.print ( " " + x + " | " );
  8.             else
  9.                 System.out.print ( x + " | " );
  10.        
  11.         for(int j=1; j<=9; j++){
  12.             System.out.print((x*j)+"\t");
  13.    
  14.     }System.out.println();
  15.        
  16.    
  17.     }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement