Wednesday, May 24, 2017

Pattern On Numbers



13579
35791
57913
79135
91357 

class A
{
 int i,j,x=1,y;
public void show()
{
 for(i=0;i<=4;i++)
{
 y=x;
for(j=0;j<=4;j++)
{
if(y>9)
y=1;
 System.out.print(y);
y=y+2;
}
System.out.println();
x=x+2;
}
}
public static void main(String args[])
{
 A ob=new A();
ob.show();
}
}

Related PostBlueJ Programs On Pattern

No comments:

Post a Comment

Subscribe via email

Enter your email address:

Delivered by FeedBurner