Write a java method to print multiplication table of a number n.
public class mul{
static void mult(int x){
for (int i=1; i<=10; i++){
System.out.format ("%d X %d =%d\n",x,i,x*i);
}}
public static void main (String args[]){
mult(3);
} }
Comments
Post a Comment