1
11
111
1001
11111
10001
they all are one below the other and given n =6
Regarding about the pattern program
what is the basic ap[raoch of this program i didnt undersatnd
@shlok.sharma3
it is simple
a)if row number is odd then all numbers in that row will be 1
b) if row number is even then 1st and last value of that row will be 1 and rest all values in between will be zero.
for n=6
row 1 -> 1
row 2 -> 1 1
row 3 -> 1 1 1
row 4 -> 1 0 0 1
row 5 -> 1 1 1 1 1
row 6 -> 1 0 0 0 0 1
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.