public class pattern8
{ public static void main(String[] args)
{
int i,j;
for(i=1; i<=4; i++)
{
System.out.print("\n");
for(j=i; j<=4; j++)
{
System.out.print(i);
}
}
}}
{ public static void main(String[] args)
{
int i,j;
for(i=1; i<=4; i++)
{
System.out.print("\n");
for(j=i; j<=4; j++)
{
System.out.print(i);
}
}
}}
output:
1111
222
33
4
No comments:
Post a Comment
SAY HELLO!!