answersLogoWhite

0

class Table

{

int n;

void func(int n)

{

int k=2;

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

{

System.out.println("table of "+k);

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

{

int a=j*k;

System.out.print(" "+a);

System.out.print(" ");

}

k=k+1;

System.out.print("\n");

}

}

public static void main(String k[])

{

Table t =new Table();

int num=Integer.parseInt(k[0]);//pass the number upto you want the tables eg:4

t.func(num);

}

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Program for finding the factorial of the two given number using constructor?

kjhk


How do you calculate the number of pixels in an inch?

The number of pixels in an inch of a photo or a screen or a camera is given by the software. You can change it if the program alow you to do so. Thanks rylwy


Do an 8086 assembler program to find parity of a given number?

sdfsdfsfsggbcvbg


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Need a'c' program to find given number is even or odd?

No, thanks.


Shell program to find the smallest digit of a given number?

syntax error


Write a java program to find the factorial of a given number?

Here's a simple Java program to find the factorial of a given number using a recursive method: import java.util.Scanner; public class Factorial { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print(&quot;Enter a number: &quot;); int number = scanner.nextInt(); System.out.println(&quot;Factorial of &quot; + number + &quot; is &quot; + factorial(number)); } static int factorial(int n) { return (n == 0) ? 1 : n * factorial(n - 1); } } This program prompts the user for a number and calculates its factorial recursively.


Fox pro program to reverse the given number?

reverse programe in fox pro


What was the name given to the space program using three astronauts on each flight?

It was called the Apollo mission.


Is it possible to write a program using a micro-controller such that it can read the time and operate at a given time?

Yes.


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


How do you calculate sum of digit of a given three digit number in visual basic?

simple program