Computer Science, asked by akshithapalla16, 11 months ago

Decode the logic and print the Pattern that corresponds to given input. If N= 3 then pattern will be : 10203010011012 **4050809 ****607

Answers

Answered by pradeepkommu
6

Answer:

Please find the attached file.

Explanation:

total Numbers=N*(N+1)

Every Number i appended with 0

and every row is appended with * with the multiple of 2

Attachments:
Answered by amitnrw
5

Answer:

There are N number of Rows

1st Row :  1,02....0N 0(N²+1)0(N²+2) ......... 0(N²+N)

2nd Row  **(1+N).....(N-1+N) 0(N²- (N - 2))....            0(N²-1) 0(N²)

.

.

Nth Row 2(N-1)times* (N(N+1)/2 0((N(N+1)/2 + 1)

Explanation:

If N= 3

then pattern will be :

10203010011012

**4050809

****607

If N= 4

then pattern will be:

1020304017018019020

**50607014015016

****809012013

******10011

LOGIC :

There are N number of Rows

1st Row :  1,02....0N 0(N²+1)0(N²+2) ......... 0(N²+N)

2nd Row  **(1+N).....(N-1+N) 0(N²- (N - 2))....            0(N²-1) 0(N²)

.

.

Nth Row 2(N-1)times* (N(N+1)/2 0((N(N+1)/2 + 1)

Similar questions