Advertisement
veronikaaa86

02. Multiplication Table

Nov 6th, 2021
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. package nestedLoops;
  2.  
  3. public class P02MultiplicationTable {
  4. public static void main(String[] args) {
  5. //1 * 1 = 1
  6. for (int firstNum = 1; firstNum <= 10; firstNum++) {
  7. for (int secondNum = 1; secondNum <= 10; secondNum++) {
  8. System.out.printf("%d * %d = %d%n",
  9. firstNum, secondNum, firstNum *secondNum);
  10. }
  11. }
  12.  
  13. }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement