desislava_topuzakova

02. Multiplication Table

Feb 14th, 2022
1,229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. public class MultiplicationTable_02 {
  2.     public static void main(String[] args) {
  3.         //първи множител -> 1 до 10
  4.         //втори множител -> 1 до 10
  5.         //за всяка стойност на 1 множител -> повтаря се: всяка стойност на втория множител
  6.         for (int first = 1; first <= 10; first++) {
  7.             for (int second = 1; second <= 10; second++) {
  8.                 int product = first * second;
  9.                 System.out.println(first + " * " + second + " = " + product);
  10.             }
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment