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