Computer Science, asked by adityachauhan615, 1 year ago

Write a program to display the mathematical tables of 5 to 10 for 10 iterations in the given format :

Sample Output : Table of 5

5*1=5
5*2 = 10
------------
------------
5*10=50..

Answers

Answered by Bond54132
5

the answer is:

import java.io.*;

class tables

{

   void main()throws IOException

   {

       BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

       System.out.println("Enter the number for which you want the tables ");

       int n=Integer.parseInt(br.readLine());

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

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

       {

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

       }

   }

}

Similar questions