Simple and Comprehensive Java Programs
Labels
Armstrong
(1)
Array
(1)
Celsius to Fahrenheit
(1)
Commandline
(4)
even odd
(1)
Factorial
(1)
Fibonacci
(1)
Hello World
(1)
Java.Lang.Math
(1)
java.util.Arrays
(1)
Java.Util.Scanner
(3)
Reverse of number
(1)
Rhombus
(1)
Square Root
(1)
Table
(1)
Monday, 9 September 2013
Java Program to make table of user entered a number through Commandline
class Table
{
public static void main(String ar[])
{
int num=Integer.parseInt(ar[0]);
for(int i=1;i<=10;i++)
{
System.out.println(+num +"*"+ i +"=" + (num*i));
}
}
}
Output:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment