Advertisement
Azazavr

Таблица умножения (простой способ)

Feb 22nd, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. public class Test4 {
  2.  
  3.     public static void main(String[] args) {
  4.         System.out.println("* |   1  2  3  4  5  6  7  8  9");
  5.         System.out.print("--------------------------------");
  6.         for (int i = 1; i < 10; i++) {
  7.             System.out.println(" ");
  8.             System.out.print(i + " | ");
  9.             for (int j = 1; j < 10; j++) {
  10.                 System.out.printf("%3d", i * j);
  11.             }
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement