Java programme to print multiplication table of a given numeber.

public class Nilesh{

    public static void main (String args[]){

        int n=10;  // n is also achieve by user with the help of Scanner function 

        int i;

        for (i=1; i<11; i++ ){

            int mult=n*i;

            System.out.printf("%d X %d =%d \n",n,i,mult);}}}

Comments

Popular posts from this blog

Create an array of 5 floats and calculate their sum in java .