print table any no. using for loop
import java.util.Scanner; public class Table {
public static void main(String[] args) {
int i,table;
Scanner na = new Scanner(System.in);
System.out.println("Enter any number:- ");
int n = na.nextInt();
for (i=1;i<=10;i++)
{
System.out.println(n+"*"+i+"="+n*i);
}
}
}
public static void main(String[] args) {
int i,table;
Scanner na = new Scanner(System.in);
System.out.println("Enter any number:- ");
int n = na.nextInt();
for (i=1;i<=10;i++)
{
System.out.println(n+"*"+i+"="+n*i);
}
}
}
0 comments:
Post a Comment