PL/SQL Loops

We have shifted..

https://programmingpalace.wordpress.com/ is now http://thetechstory.com/

Find this Tutorial in the given link.

http://thetechstory.com/2012/09/21/plsql-loops/

Advertisements

Multiplication Table in PHP taking Number and Limit from another Form and CSS Styling

We have shifted..

https://programmingpalace.wordpress.com/ is now http://thetechstory.com/

Find this Tutorial in the given link.

http://thetechstory.com/2012/09/18/multiplication-table-in-php-taking-number-and-limit-from-another-form-and-css-styling/

Multiplication Table in Java by taking the Number from the Command Line


class MultiTab
{
	public static void main(String[] args)
	{
		int i;
		int num = Integer.parseInt(args[0]);
		for(i=1; i<=10; i++)
		{
			System.out.println(num+ " * " +i+ " = "+num * i);
		}
	}
}

Snapshot of the o/p

Multiplication Table in Java

This is a very basic program But for a beginner it is worth trying.

And it also makes us aware about the power of for loop which can repeat so many times within a second.

public class MulTable
{
	public static void main(String[] args)
	{
		int i;
		int num = 9;
		for(i=1; i<=10; i++)
		{
			System.out.println(num+ " * " +i+ " = "+num * i);
		}
	}
}

Snapshot of the o/p