Computer Science, asked by julie8604, 21 days ago

Write a program to generate a multiplication table such as the following “9 times table”:

Answers

Answered by kajalpal1975
1

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

Scanner sc = new Scanner(System.in);

System.out.print("Table of which no. ? ");

int num = sc.nextInt();

System.out.println("Table of " + num + " ---");

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

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

}

}

}

Similar questions