Print the following pattern:
***_***
***_***
***_***
***_***
***_***
class A
{
int i,j;
public void show()
{
for(i=0;i< 5;i++)
{
{
for(j=0;j< 7;j++)
{
{
if(j==3)
System.out.print("_");
else
System.out.print("*");
}
System.out.println();
}
}
public static void main(String args[]) throws Exception
{
A ob=new A();
ob.show();
}
}
Related Post: BlueJ Programs On Pattern
No comments:
Post a Comment