Computer Science, asked by dragon125678, 13 days ago

wap to accept a number and print its table​

Answers

Answered by ItzMeSam35
3

import java.util.Scanner;

public class PrintTable {

public static void main(String [] args) {

Scanner sc = new Scanner(System.in);

System.out.println("Enter a number : ");

int num = sc.nextint();

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

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

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

}

sc.close();

}

}

Similar questions