Advertisement
veronikaaa86

11. Multiplication Table 2.0

Sep 14th, 2022
1,105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. package BasicSyntax;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P11MultiplicationTable2 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int num = Integer.parseInt(scanner.nextLine());
  10.         int times = Integer.parseInt(scanner.nextLine());
  11.  
  12.         do {
  13.             System.out.printf("%d X %d = %d%n", num, times, num * times);
  14.             times++;
  15.         } while (times <= 10);
  16.     }
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement