Please solve this ICSE question :)
Will mark as brainliest etc.
Attachments:
UnknownDude:
Things sure have gotten harder in computers since the last time I gave the boards
Answers
Answered by
2
UPLOADING VIRUS.EXE ████████████████] 99%
Lol just kidding
class pattern
{
public static void main()
{
int i,j,a,b=1;
for(i=1;i<=7;i++)
{
for(j=1;j<=7-i;j++)
{
if(j%2==0)
System.out.print("0");
else
System.out.print("1");
}
for(a=1;a<=i;a++)
System.out.print(b);
b++;
System.out.println();
}
}
Lol just kidding
class pattern
{
public static void main()
{
int i,j,a,b=1;
for(i=1;i<=7;i++)
{
for(j=1;j<=7-i;j++)
{
if(j%2==0)
System.out.print("0");
else
System.out.print("1");
}
for(a=1;a<=i;a++)
System.out.print(b);
b++;
System.out.println();
}
}
Similar questions