
Using for loop write a program to print the table of a given number on the screen

import java.util.*;
class PrintTable
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("Enter number whose table is to display: ");
int num=input.nextInt();
for(int i=1;i<=10;i++){
int m=num*i;
System.out.println(m);
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.