Advertisement
Azazavr

com.javarush.test.level04.lesson10.task05

Mar 25th, 2015
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. package com.javarush.test.level04.lesson10.task05;
  2.  
  3. /* Таблица умножения
  4. Вывести на экран таблицу умножения 10х10 используя цикл while.
  5. Числа разделить пробелом.
  6. 1 2 3 4 5 6 7 8 9 10
  7. 2 4 6 8 10 12 14 16 18 20
  8. ...
  9. */
  10.  
  11. public class Solution
  12. {
  13.     public static void main(String[] args) throws Exception
  14.     {
  15.         int a=1;
  16.         int b=1;
  17.         while(a <= 10){
  18.             while (b <= 10)
  19.             {
  20.                 System.out.print(a*b + " ");
  21.                 b++;
  22.             }
  23.             System.out.println();
  24.             a++;
  25.             b=1;
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement