Telegram Group & Telegram Channel
33. Number pattern 8.

5
11111
0000
111
00
1


import java.util.Scanner;

class Pattern
{
public static void main(String args[])
{
int n, i, j;
Scanner sc = new Scanner(System.in);

System.out.println("Enter the number of rows ");
n = sc.nextInt();

for (i = 1; i <= n; i++)
{
for (j = i; j <= n; j++)
{
if (i % 2 == 0)
System.out.print("0");
else
System.out.print("1");
}
System.out.println();
}
}
}

@java_codings



tg-me.com/java_codings/45
Create:
Last Update:

33. Number pattern 8.

5
11111
0000
111
00
1


import java.util.Scanner;

class Pattern
{
public static void main(String args[])
{
int n, i, j;
Scanner sc = new Scanner(System.in);

System.out.println("Enter the number of rows ");
n = sc.nextInt();

for (i = 1; i <= n; i++)
{
for (j = i; j <= n; j++)
{
if (i % 2 == 0)
System.out.print("0");
else
System.out.print("1");
}
System.out.println();
}
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/45

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

That strategy is the acquisition of a value-priced company by a growth company. Using the growth company's higher-priced stock for the acquisition can produce outsized revenue and earnings growth. Even better is the use of cash, particularly in a growth period when financial aggressiveness is accepted and even positively viewed.he key public rationale behind this strategy is synergy - the 1+1=3 view. In many cases, synergy does occur and is valuable. However, in other cases, particularly as the strategy gains popularity, it doesn't. Joining two different organizations, workforces and cultures is a challenge. Simply putting two separate organizations together necessarily creates disruptions and conflicts that can undermine both operations.

Advance Java ‍ from us


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA