class NestedForDemo
{
public static void main(String args[])
{
int i , j , num ;
num = 6 ; //value of num is between 1 to 10
for (i=1 ; i<=num ; i++)
{
for (j=1 ; j<=i ; j++)
System.out.print("*\t");
System.out.println(" ");
}
}
}
Labels: Java Codes
Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies| |
---|
0 comments:
Post a Comment