and i=1 Ex. | 1 2 3 4 | | 5 6 7 8 | | 9 10 11 12 | | 13 14 15 16 | OutPut: For i=0 1 2 3 4 8 12 16 15 14 12 9 5 6 7 11 10 for i=1 1 5 9 13 14 15 16 12 8 4 3 2 6 10 11 7 | Basics Discussion | Q4I" /> and i=1 Ex. | 1 2 3 4 | | 5 6 7 8 | | 9 10 11 12 | | 13 14 15 16 | OutPut: For i=0 1 2 3 4 8 12 16 15 14 12 9 5 6 7 11 10 for i=1 1 5 9 13 14 15 16 12 8 4 3 2 6 10 11 7 | Basics Discussion | Q4I" />
Note 1
##### Take Note:

Take a note while surfing.

##### Note With Ink

Give your Note a Colorful Tag.

##### Easy to Access

Stay on same information and in Sync wherever you are.

Note 2
##### Take Note:

Organize your information,It may take Shape.

##### Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3
##### Take Note:

Don't Let information to miss,Because it take shape

##### Note With Ink

Simple an Easy Way to take a note.

##### Easy to Access

Get the same in next visit.

Program Discussion :: Basics
Home > Programs > Basics

# ``````161. Write a program to print the matrix element in clock-wise and anti clock-wise sprial, if the given value of i=0 and i=1 Ex. | 1 2 3 4 | | 5 6 7 8 | | 9 10 11 12 | | 13 14 15 16 | OutPut: For i=0 1 2 3 4 8 12 16 15 14 12 9 5 6 7 11 10 for i=1 1 5 9 13 14 15 16 12 8 4 3 2 6 10 11 7``````

``````