//This Java program prints the following pattern
//1
//11
//111
//1111
//11111
class pattern
{
public static void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
System.out.print(1);
}
System.out.println();
}
}
}
//Author : Mayank Rajoria
//1
//11
//111
//1111
//11111
class pattern
{
public static void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
System.out.print(1);
}
System.out.println();
}
}
}
//Author : Mayank Rajoria
No comments:
Post a Comment