Computer Science, asked by TheVerifiedQuestion, 1 month ago

Java program to print table of 15​

Answers

Answered by as3623333
2

Answer:

Java Program to Print Multiplication Table for any Number

public class Multiplication_Table.

Scanner s = new Scanner(System.

System. out. print("Enter number:");

int n=s. nextInt();

for(int i=1; i <= 10; i++)

System. out. println(n+" * "+i+" = "+n*i);

Answered by akvaio689
0

Hey, here is the INPUT :

public class MultiplicationTable {

   public static void main(String[] args) {

       int num = 15;

       for(int i = 1; i <= 10; ++i)

       {

           System.out.printf("%d * %d = %d \n", num, i, num * i);

       }

   }

}

And the output would be like this :

15 * 1 = 15

15 * 2 = 30

15 * 3 = 45

15 * 4 = 60

15 * 5 = 75

15 * 6 = 90

15 * 7 =  105

15 * 8 = 120

15 * 9 = 135

15 * 10 = 150

Similar questions