Wap to Print pattern.
101010
010101
101010
010101
Answers
Answered by
1
Answer:
Explanation:
public class Pattern
{
public static void main(String args[])
{
int a=1;
for(int j=1;j<=4;j++)
{
for(int i=0;i<=5;i++)
{
if(i>0)
if(a==0)
a=1;
else
a=0;
System.out.print(a+" ");
}
System.out.println();
}
}
}
Similar questions
English,
3 months ago
English,
3 months ago
Math,
7 months ago
Political Science,
1 year ago
Chemistry,
1 year ago